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
The defaults are now applied before the call to ScrollSubrange#create.
After is too late given that for offset positions, the direction may
switch from backward to forward.
Closes gh-900
Prior to this commit, GraphQL Request Observations would not record
errors as Observation errors, because with GraphQL errors can partially
affect the response and there can be multiple. Instead, an invalid
request (for example) would lead to a `"graphql.outcome", "REQUEST_ERROR"`
low cardinality KeyValue. In this case, developers would not know what
type of error occured nor if there were multiple.
This commit records all errors listed in the GraphQL as
Observation.Event on the request Observation. Such events are usually
handled by the tracing handler and are recorded as span annotations for
traces. Other `ObservationHandler` annotations can leverage events in a
different fashion.
Closes gh-859
Prior to this commit, gh-676 fixed the local and global context
inheritance in the `ContextDataFetcherDecorator` with a workaround.
This commit undoes this workaround and uses the new Context Propagation
API for this, effectively raising the requirement for version 1.0.3 and
removing all deprecated APIs in the meantime.
Closes gh-688
`v4.4.0` adds support for Federation v2.6 and v2.7. This version also includes performance fix to federating tracing instrumentation (`ftv1`) that skips unnecessary computations.
GraphQlArgumentBinder allows external determination of the raw value to use,
and ArgumentMethodArgumentResolver allows customizing the invocation of
the binder.
See gh-864