-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not override custom local context in observation instrumentation
Prior to this commit, the `GraphQlObservationInstrumentation` would always assume that local context instances are of type `GraphQLContext`. This means that a custom context type would be overwritten with a `GraphQLContext` that contains the current observation. Instead, this commit ensures that a local context is contributed only if none was present, or that we wrap the existing one only if it is a `GraphQLContext` in the first place. If the parent data fetcher contributes a custom context, the current observation will not be added. Fixes gh-918
- Loading branch information
Showing
2 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters