CoroutinesUtils#invokeSuspendingFunction in adapts return values to Mono
and Flux in Kotlin. However, Flow methods don't have to be suspending
functions. This change ensures that ReactiveAdapterRegistry is applied
wherever return values are handled.
Closes gh-988
This commit adds support for GraphQL fragments with `GraphQlTester`.
Fragments allow to avoid repetition in GraphQL requests by reusing
field selection sets.
For example, the "releases" fragment can be reused in multiple queries
and make the overall document shorter:
```
query frameworkReleases {
project(slug: "spring-framework") {
name
...releases
}
}
query graphqlReleases {
project(slug: "spring-graphql") {
name
...releases
}
}
fragment releases on Project {
releases {
version
}
}
```
With this change, `GraphQlTester` accepts fragments as `String` or can
load them by their name using the configured `DocumentSource`, similarly
to the document support.
Closes gh-964
The `applyDecorator` method is working to exclude things from
graphql-java. The TrivialDataFetcher interface is used to know when
to perform instrumentation and is a part of the public SPI and
should be preserved.
See gh-983
Prior to this commit, we introduced in gh-906 custom `RequestPredicates`
for faster and more efficient matching. These custom WebFlux and MVC
predicates did not set the matching `PathPattern` as a request attribute
for positive matches. This value is used by observability conventions
for metrics and traces KeyValues; as a result, observation metadata is
missing the "uri" metadata and is using the "UNKNOWN" value instead.
This commit adds the missing request attribute in our custom request
predicates.
Fixes gh-987
Closes gh-972
Federation JVM v5 is now using `graphql-java` v22 which caused following breaking changes in behavior
- Apollo `CacheControlInstrumentation` - was using old deprecated instrumentation methods so old version will not work with latest `spring-graphql` version
- there was a breaking change in the schema printing behavior of `@deprecated` information - previously it was always included regardless whether printed schema was filtering `@deprecated` directive definition. This is an issue for folks relying on self-managed Federation that uses `_service { sdl }` endpoint to obtain subgraph schemas as the supergraph schema would no longer include any deprecation information.