In GraphQL, where do errors typically appear in a response?
GraphQL errors: a response can contain both data and errors. Because GraphQL usually returns HTTP 200 even on partial failure, clients must inspect the errors array rather than relying on the status code alone.
2 / 5
What is a partial response in GraphQL error handling?
Partial response: if one resolver fails, GraphQL can still return the fields that succeeded. The failed field is set to null and an entry is added to errors, letting clients render what they can.
3 / 5
What is the purpose of the extensions field on a GraphQL error?
Error extensions: a free-form object where servers attach structured data like code: 'UNAUTHENTICATED'. Clients branch on these codes rather than parsing human-readable messages, which may change.
4 / 5
Why is leaking raw exception details in GraphQL errors a security concern?
Error masking: production servers should replace internal exceptions with generic messages and log the details server-side. Exposing database queries or file paths gives attackers reconnaissance information.
5 / 5
What does the term error policy mean in a GraphQL client like Apollo?
Error policy: options like none, ignore, or all decide whether the client surfaces partial data, discards it, or throws. Choosing all lets the UI show available data while still reporting errors.