GraphQL always returns HTTP 200 — errors appear in the errors array alongside any data that was successfully resolved. Throw UserInputError or GraphQLError for expected failures. For typed error handling use the result union pattern, creating a union of success and error ObjectTypes so clients get typed access to failure cases.
GraphQL always returns HTTP 200 — errors go in the errors array alongside partial data.
UserInputError — for client validation errors; sends extensions.code to help clients identify the issue.
ForbiddenError — for authorization failures inside resolvers.
Result union pattern — makes errors part of the schema; clients get typed access to success and failure cases.
The result union pattern is the modern preferred approach for complex mutations with multiple failure modes.