Currently in GraphQL JS implementation there is no standard way of returning a descriptive success message from mutation, such as "User created successfully", etc. My question has 2 parts:
My thinking is that it is beneficial to return a success message from the API. That way the messages can be uniform across different clients (e.g. web and mobile). Clients don't have to implement their custom messages for each API call. But I'm not sure what the best practice is. Are there any drawbacks of returning a descriptive success message from mutation calls (besides increased response size)?
If I decide to do it, is there a standard way in graphql-js to do this?
For example, is it possible to get back something like:
{
data: {
mutationName: {var1:"val1"}
},
messages: {
mutationName:"User created successfully"
}
}