Description
Right now, when some error happens inside GraphQL schema or in the syntax wise we get errors as whole. Then it's our job to decide what to do with it.
But it would be great, if we can have a set of GraphQL error types(in the spec) which deals with different use cases.
- Syntax/Type Errors - These errors are for the errors in client provides query
- Runtime Errors - These are the error occurred in runtime specially with syntax errors and network related errors.
- User Errors - These are the errors we need to pass to the user.
Right now, in the graphql-js implementation, we get all these errors as one type. But, it'll be useful if we've some mechanism to differentiate them.
So, it would be great GraphQL spec to define these errors. So, the implementations can use them. Also, the people who write GraphQL schemas can use them to define User Errors.
Then, in the transport layers we can check for these three types of errors and do necessary actions.
Is there any plan to have these in spec. If so, I'd like to work on them.