0
i’m working on creating mutations for a project i’m working on but stuck on the resolver returns, i won’t to handle the errors while i’m at it as well by sending back messages for notifications to make it user friendly, but let’s say my mutation is UPDATE_USER and it should also return the updated user instance, how can i set my mutation to double returns if possible?
that’s how it looks
export const UPDATE_USER = {
type: UserType,
args: {
user_id: {type: GraphQLString}!,
first_name: {type: GraphQLString}!,
last_name: {type: GraphQLString},
but i want something like this incase there’s no user like the update failed for some reason
export const UPDATE_USER = {
type: UserType|| MessageType,
args: {
user_id: {type: GraphQLString}!,
first_name: {type: GraphQLString}!,
last_name: {type: GraphQLString},
but i can’t find a way to make it work
New contributor