This commit upgrades the default react version used in the GraphiQL
build shipped with the project. This also fixes a few HTML syntax issues
in the index.html page.
This commit fixes the observability instrumentation for data fetchers
when the return type is of `CompletionStage`. Prior to this commit, the
instrumentation of `CompletionStage` return values as
`DataFetcherResult` would wrap the asynchronous value twice.
Closes gh-676
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
This adds support for date values to JsonKeysetCursorStrategy by default
when Jackson is on the classpath and also updates the documentation to
provide guidance.
Closes gh-684
We now use the factory methods introduced on ScrollPosition to create new instances of both Keyset- as well as OffsetScrollPosition. Also simplified a few places in which the API now provides a more convenient way to advance offsets.
Related ticket: #679.
Break down inspectType into two methods, one to inspect fields in a
GraphQLFieldContainer, and another to inspect a field output type.
The former is more straight forward and applies to Query, Mutation,
and Subscription. The latter does type handling such as unwrapping,
and nesting, and also requires a non-null Java ResolvableType.
Normally a multivalue Publisher is collected to a List, so we can treat
it as a match for a List field. For subscriptions, however, such a
Publisher is left as an infinite stream, and we should not treat as a
match for a List, but rather expect it to be a stream of List items.
Discovered while working on gh-674, which is closely related.
This commit adds the relevant reflection metadata for supporting
`@GraphQlExceptionHandler` annotated methods in controllers and
`@ControllerAdvice` beans.
Closes gh-677
Prior to this commit, the `GraphQlObservationInstrumentation` would
organize the parent/child relationship between data fetcher observations
by setting the current observation under a well-known key in the global
GraphQL context.
In some cases, the order of execution and the scheduling of operations
does not reflect the actual operation hierarchy as defined by the
GraphQL `ExecutionStepInfo`. This would result in traces where data
fetching operations are set with incorrect parent/child relationships.
This commit ensures that data fetcher observations have their parent set
with the expected one, by keeping track of active observations and using
the `ExecutionStepInfo` path as a key.
Fixes gh-676