-
Notifications
You must be signed in to change notification settings - Fork 588
Description
Problem Statement
Add support for customized errors for some of the most popular GraphQL clients.
Context:
- GraphQL Connected Services #2198 (parent issue)
- GraphQL server errors #2257 (server side)
Solution Brainstorm
See how we can hook into the different GraphQL client libraries to capture errors and spans.
- expected behavior: https://develop.sentry.dev/sdk/features/#graphql-client-integrations
- RFC: https://github.com/getsentry/rfcs/blob/main/text/0087-graphql-errors.md
- previous (buggy) implementation via HTTP clients: https://github.com/getsentry/sentry-python/pull/2243/files
We might want to add an optional flag called capture_errors (default True) to all client integrations to allow folks to turn error reporting off. If a user has both their client and server side GraphQL instrumented with Sentry, they could use this to select which of the integrations they want to use to capture the error (which would otherwise be reported by both client and server).
Client GraphQL integrations need to be enabled explicitly, i.e., they shouldn't be auto-enabled. The feature should be opt in so that users are not hit with a lot of new unexpected errors that count towards their quota.