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
The QueryDsl and QBE data fetcher builders now accept a default count
and a function for a default position with awareness of the scroll
direction.
Closes gh-917
Both forward and backward scrolling needed adjustment.
For forward, we were not advancing by 1.
For backward, we were advancing by the count and 1 more than necessary.
Closes gh-916
Prior to this commit, the `ControllerAdvice` support would detect all
beans and exception handler methods, to put them in an ordered `TreeMap`
using the `OrderComparator.INSTANCE`. Doing so would naturally consider
beans with the same order as duplicates and would write a single entry
in the map. This effectively ignored many `ControllerAdvice` beans with
the same order (but one).
This commit removes the use of a `TreeMap` and instead uses a
`LinkedHashMap` and the insertion order for proper ordering.
Fixes gh-901
Prior to this commit, Spring Boot applications would wire the GraphQL
handlers (for various transports and both WebFlux and WebMVC) with
standard `RequestPredicates` chained into a `RouterFunction`.
While this is the expected way for custom application endpoints, stock
predicates are more general purpose and require some overhead when
copying attributes.
This commit introduces custom predicates, optimized for faster and lower
overhead matching. The new `GraphQlRequestPredicates` classes provide
factory methods for HTTP and SSE predicates.
Closes gh-906
Prior to this commit, the WebFlux and WebMVC infrastructure would only
support subscriptions over the WebSocket and RSocket transports.
This commit adds the `GraphQlSseHandler` implementations for both web
frameworks. This handler will send GraphQL responses as as stream of
Server-Sent Events, over an HTTP response with the "text/event-stream"
content type.
This implementation only supports the "Distinct connections mode" and
will reject all operations other than Subscriptions.
This commit also enhances the `HttpGraphQlTransport` client transport to
support subscriptions over this new protocol.
Closes gh-309