Prior to this commit, the `GraphQlHttpHandler` implementations would use
the JSON codecs configured in the web Framework (MVC or WebFlux) for
reading and writing GraphQL payloads as JSON documents.
This can cause issues in cases the application configures the JSON codec
in a way that makes it incompatible with the expected GraphQL documents.
For example, not serializing empty values and arrays.
This commit adds new constructors in `GraphQlHttpHandler`
implementations that can get a custom JSON codec for GraphQL payloads.
Closes gh-860
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
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