The ConnectionDataFetcher now handles a null return value from the
delegate DataFetcher, turning leniently into an empty connection.
Also log a debug message in case of a TrivialDataFetcher mapped to
a connection field, and do not decorate it to begin with.
Closes gh-707
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.