This commit explains why Jackson annotations have no impact on the
serialization/deserialization process. Instead applications should
describe and coerce types using scalars.
Fixes gh-321
GraphQlTransport returns ExecutionResult with parsed JSON so for the
most part having MappingProvider is enough. However, when a JSONPath
evaluates to String (vs Map or List), the JsonSmartJsonProvider used by
default, throws UnsupportedOperationException from toJson.
I'm getting very slow times on failures to resolve Boot snapshots
through the gradlePluginPortal (3-4 min build time). Moving it down
after repo.spring.io restores regular build times.
Prior to this commit, the `GraphQlTester#executeAndVerify` method would
check that an `"$.errors"` JSON path exists within the response and
contains no value.
This should fail with valid GraphQL responses, as the spec says that a
response with no error should not contain the errors map at all:
http://spec.graphql.org/draft/#sec-Errors
This commit changes the assertion and instead checks for the absence of
the errors map in the response.
Fixes gh-318
This `handleConnectionCompletion` method on `WebSocketInterceptor`
method handles the `complete` GraphQL over WebSocket message which is
defined as canceling an individual subscription stream. The method was
incorrectly modeled as a notification for the closing of the whole
connection.
The method has been renamed, Javadoc clarified, and the subscription
id passed in.
See gh-276
WebGraphQlHandler is no longer aware of individual callbacks on
WebSocketInterceptor and instead provides a method to return the
interceptor. This allows the WebSocket handlers for WebFlux and WebMvc
to call the interceptor directly.
See gh-276
The JSON Encoder and Decoder implementations configured via
CodecConfigurer for HTTP and WebSocket are adapted to a JSONPath
MappingProvider and now automatically registered in JSONPath
configuration.
See gh-10, see gh-317
As these are expected to be used as local variables, "Spec" reduces
readability and the IDE creates variables called "spec", which
increases that effect. Given those are nested within `GraphQlClient`
and `GraphQlTester`, it makes sense to drop the spec part and local
variable names such as request and response make sense.
See gh-10, see gh-317
Add WebGraphQlClient as a common representation for a Web GraphQlClient
extension and its builders that has to be started through the HTTP or
WebSocket implementations.
Remove the common base builder for HTTP and WebSocket, with HTTP simply
delegating to the underlying WebClient builder For WebSocket, builder
state is exposed from the transport to simplify the mutation logic.
DefaultGraphQlClientBuilder is now abstract, leaving subclasses to
implement the build method.
See gh-10
Now that transport specific GraphQlClient extensions provide a unified
builder for GraphQlClient and transport configuration, the transports
become a private implementation detail.
See gh-10
Add HttpGraphQlClient and WebSocketGraphQlClient extensions along with
a builder hierarchy that combines GraphQlClient and transport specific
configuration.
See gh-10
Extract GraphQlRequest, as a parent of RequestInput, that holds the
actual request inputs sent from the client side. RequestInput then
adds server-side transport details and ExecutionInput support.
Also replace "query" with "document" in GraphQlRequest and in
GraphQlClient.
Closes gh-310
This commit ensures that the `Resource` description is provided when
a schema resource is missing, cannot be read, or is invalid.
This is useful when the application holds multiple schema files and
an error is thrown because of a particular file.
Close gh-307
Important to mention the `GraphQlSourceBuilderCustomizer` which is
otherwise mentioned neither in the Boot starter nor the reference here.
It is the path to a number of customizations that are discussed in
`GraphQlSource` subsections.
See gh-233