GraphQL

Adds instrumentation for GraphQL. (default)

Import name: Sentry.graphqlIntegration

This integration is enabled by default when performance monitoring is enabled. If you'd like to modify your default integrations, read this.

The graphqlIntegration adds instrumentation for the mongodb library to capture spans using @opentelemetry/instrumentation-mongodb.

  • graphql: >=3.3 <7

Type: boolean

If spans for resolver functions should not be created. Default is true.

Type: boolean

If spans for the execution of the default resolver on object properties should not be created. Default is true.

When a resolver function is not defined on the schema for a field, GraphQL will use the default resolver which just looks for a property with that name on the object. If the property is not a function, it's not very interesting to trace. This option can reduce noise and number of spans created.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").