hasValue is more meaningful because it means valid and with some value
that could be decoded, which in turn allows removing Nullable from
toEntity/List.
Or if there is no value, getError() can be used to differentiate
between a failed field vs a null field declared optional.
See gh-10
getError now returns either the error at the field or on a parent
field, which provides a reliable answer for why a field failed even
for a field whose path is below where the error occurred.
getErrors likewise now also includes errors above. There is still no
need for special logic to get only errors below since where there is
a field value, errors are below anyway.
See gh-10
We now initialize the argument resolver with a context instead of
relying on …Aware callbacks that are not supported by
AnnotatedControllerConfigurer.
Closes gh-333
Instead of embeddeding the Concourse Release Scripts application as a
JAR in the CI image, this commit is now using the published Docker image
for this.
DefaultClientGraphQlResponse now parses the path to a field and creates
the same parsed representation as GraphQL Java does and uses for
GraphQLError paths. This makes it easier to correlate fields to field
errors and eliminates the need for a dependency on JSONPath in the
client.
See gh-10
Refine exception handling and ensure a hierarchy of exceptions that
allows differentiating between transport errors vs field errors while
accessing an invalid data or field.
See gh-10
Replace the use of ExecutionResult on the client side where we are
dealing with a response map rather, and also incorporate it into the
server-side hierarchy where it wraps an ExecutionResult instead.
See gh-10
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