Skip to content
Advertisement

Tag: graphql

GraphQL Error field type must be Input Type but got:

Here is the mutation: Here is the schema used in the details field of the mutation: Error I am getting on running this code is : I have used this syntax with queries and they worked correctly. But, they are returning error with a mutation. What is incorrect in my code and how do I correct it? Answer In GraphQL,

Custom Error Object with Apollo Server

I’m trying to use a custom error with apollo-server and it seems that my custom error has a property (code) that isn’t available from within formatError. I have a simple error handler works something like this: I’m having trouble because when I log error.code from within formatError it’s not available. How can I propagate custom properties (like code) of error

Advertisement