Brian Clozel 0a41104226 Use localContext for storing data fetcher observations
Prior to this commit, a partial fix in a56ff6e introduced proper
relationships between request and data fetcher observations by tracking
them in a local concurrent map. This fix is incomplete as data fetcher
operations are not set as current in the ThreadLocal or reactive
contexts when the actual DataFetcher is executed.

We cannot use the global GraphQLContext for DataFetcher observations,
as it is shared for the entire GraphQL request (and no thread safe).

This commit makes the Instrumentation instrument DataFetcher and make
them return a `DataFetcherResult` that holds a
`g.s.DataFetchingEnvironment#getLocalContext` with a reference to the
current data fetcher observation. A temporary fix is also applied in
`ContextDataFetcherDecorator` to merge both global and local contexts
when capturing a `ContextSnapshot` to be applied for the data fetching
operation.

Fixes gh-676
See gh-688
2023-05-10 14:50:45 +02:00
2023-02-20 11:45:39 +01:00
2023-01-13 14:24:30 +01:00
2023-03-20 18:20:43 +01:00
2023-03-02 12:18:07 +00:00
2023-03-20 18:20:43 +01:00
2023-01-13 14:24:30 +01:00
2023-01-13 14:24:30 +01:00
2020-07-23 09:40:14 +03:00
2022-11-24 11:06:45 +00:00

Spring for GraphQL Build status

GraphQL support for Spring applications with GraphQL Java.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.

Documentation

This project has reference documentation (published and source), an API reference. The are samples in the 1.0.x branch that will be moved out into a separate repository.

Continuous Integration Builds

Information regarding CI builds can be found in the project's Concourse pipeline documentation.

Stay in Touch

Follow @SpringCentral.

License

This project is released under version 2.0 of the Apache License.

Description
No description provided
Readme 5.9 MiB
Languages
Java 97.9%
CSS 1.2%
Shell 0.7%
HTML 0.2%