Prior to this commit, the `GraphQlObservationInstrumentation` was
incorrectly setting up the parent observation for both request execution
and data fetching observations.
In the case of the request execution, we were not looking into the
`GraphQLContext` for an existing observation - this commit ensures that
if such an observation exists, it is set as the parent.
As for the data fetching observation, we were incorrectly assuming that
the parent of all data fetching operations was the request execution
one, whereas data fetching operations can be nested. This commit ensures
that we only rely on the current observation in the GraphQL context.
Fixes gh-611
Dropping this the dedicated resolver for @Argument Map<String, Object>
leaves it to ArgumentMethodArgumentResolver and
ArgumentsMethodArgumentResolver to handle the case of
Map<String, Object>, treating it either as a raw argument value for a
named argument, or as the full raw arguments map.
Closes gh-548
Validate an individual method parameter when it's annotated with
Spring's @Validated rather than with @Valid, in which case method
validation does not validate the parameter.
Closes gh-571
Perform the check for whether validation for a HandlerMethod is needed
earlier and only once rather than in the constructor of
DataFetcherHandlerMethod.
Make the validation helper passed to DataFetcherHandlerMethod stateful,
so that validation groups are also determined once on startup.
See gh-571
This commit adds a new Observability section in the reference
documentation, explaining the request and data fetcher observations
created by the new instrumentation.
Closes gh-595
This commit configures the Backport Bot for the repository workflows.
See https://github.com/spring-io/backport-bot
This will create backport issues whenever issues created on the main
line are tagged with the relevant issue label.
This commit documents the GraalVM Native image support in Spring for
GraphQL and lists relevant pointers to the Spring Framework and Spring
Boot documentations.
This also explains how developers are expected to provide reachability
hints for the cases where the AOT processing is not able to discover the
relevant types.
Closes gh-581
This commit adds reachability metadata for resources loaded by the
`GraphQlClient` and `GraphQlTester` when using the `document("name")`
API variant. This method loads the query file from the classpath at
particular locations, namely `"classpath:graphql-documents/"` and
`"classpath:graphql-test/"` with the `".graphql"` and `".gql"` file
extensions.
This commit adds the relevant resource metadata so that such resources
are loaded in the GraalVM native image at build time when the client or
the tester are reachable through the static analysis.
Fixes gh-575
Prior to this commit, using the RSocket client in a native image would
fail when setting up the codecs, if the chosen transport was WebSocket.
This is due to the fact that the `GraphQlWebSocketMessage` type was not
registered for reflection and the proper codec could not be detected as
a result.
This commit adds reflection metadata for this type.
Fixes gh-574
This commit logs the number of schema resources that were loaded to
create the GraphQL schema, at the INFO level. If DEBUG is enabled for
this package, the description of all schema resources will be logged as
well.
Closes gh-566
This commit mentions the `"application/graphql-response+json`" media
type in the reference documentation as the main media type used by the
server.
See gh-563