This commit sets the new GraphQL Java baseline to 24.0 for this Spring
for GraphQL generation.
This also uses the new `DataLoader#getName` property in the batch loader
registry and the observability instrumentation.
Closes gh-1210
Closes gh-1211
ContextDataFetcherDecorator was not retaining extensions for DataFetchers returning
a DataFetcherResult instance.
Closes gh-1199
Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com>
[brian.clozel@broadcom.com: apply code conventions]
Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
Prior to this commit, the `GraphQlArgumentBinder` would choose between
two strategies:
* if there is a constructor with arguments, instantiate the target and
bind it using the constructor
* otherwise, use the default constructor and use bean properties binding
This commit extends the first case and attempts to further bind bean
properties after constructor instantiation.
Closes gh-1163
The various GraphQL clients supported in this project automatically detect
JSON codecs for reading/writing GraphQL requests as JSON payloads.
If there is none detected, clients provide a default codec instance.
This commit configures automatically the `GraphQlModule` from gh-1174 in
default codecs and add integration tests for `FieldValue<T>` usage on the
client side.
This also improves the documentation around `FieldValue<T>` for both
server and client side support.
Closes gh-1190
This commit adds a new `GraphQlModule` Jackson module that supports:
* serialization/deserialization of `FieldValue<T>`
* the upgrade of `FieldValue<T>` as reference types
This enables `FieldValue<T>` to be read/written from/to JSON with
Jackson on the client side. Note, on the server side this module is not
involved as the payload is deserialized as a `Map<String,Object>` and
values are bound as `FieldValue<T>` types directly.
Closes gh-1174
Signed-off-by: James Bodkin <james.bodkin@amphora.net>
[brian.clozel@broadcom.com: apply code conventions, use FieldValue type]
Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
Prior to this commit, `ArgumentValue<T>` would mainly focus on the
server-side support with the binding of arguments on Controller methods.
With the introduction of this feature on the client in gh-1174, this
commit reconsiders both the `ArgumentValue<T>` name and its package
location to reflect the broader support.
This commit deprecates `ArgumentValue<T>` in favor of `FieldValue<T>`
with similar support.
Closes gh-1187
Prior to this commit, the `GraphQlObservationInstrumentation` would
instrument the following operations:
* GraphQL requests
* GraphQL data fetching operations
In the case of batch loading operations, the instrumentation would
consider each load call as a separate data fetching operation. This
would significantly clutter recorded traces and would make it look like
"N+1 problems" would still be present.
This commit adds a new "graphql.dataloader" observation for such
operations and avoids recording data fetching observations when
`SelfDescribingDataFetcher` declare that they call batch loading
operations.
Closes gh-1034