Commit Graph

880 Commits

Author SHA1 Message Date
Brian Clozel
ddf2ac83ac Upgrade to Micrometer 1.10.7
Closes gh-700
2023-05-15 14:29:34 +02:00
Brian Clozel
d106af5ad1 Upgrade to Reactor 2022.0.7
Closes gh-699
2023-05-15 14:28:38 +02:00
Brian Clozel
4616d0fde3 Upgrade to Spring Security 6.0.3
Closes gh-698
2023-05-15 14:27:05 +02:00
Brian Clozel
968b8e6673 Upgrade to Spring Data 2022.0.6
Closes gh-697
2023-05-15 14:26:16 +02:00
Brian Clozel
66fd6b05db Upgrade to Spring Boot 3.0.6 2023-05-15 14:24:53 +02:00
Brian Clozel
51cf46657d Upgrade to GraphQL Java 19.5
Closes gh-696
2023-05-15 14:24:23 +02:00
Brian Clozel
cec3555687 Upgrade to Spring Framework 6.0.9
Closes gh-695
2023-05-15 14:22:34 +02:00
Brian Clozel
faea9d1c8b Fix observability instrumentation for CompletionStage
This commit fixes the observability instrumentation for data fetchers
when the return type is of `CompletionStage`. Prior to this commit, the
instrumentation of `CompletionStage` return values as
`DataFetcherResult` would wrap the asynchronous value twice.

Closes gh-676
2023-05-11 14:44:32 +02:00
Brian Clozel
0a41104226 Use localContext for storing data fetcher observations
Prior to this commit, a partial fix in a56ff6e introduced proper
relationships between request and data fetcher observations by tracking
them in a local concurrent map. This fix is incomplete as data fetcher
operations are not set as current in the ThreadLocal or reactive
contexts when the actual DataFetcher is executed.

We cannot use the global GraphQLContext for DataFetcher observations,
as it is shared for the entire GraphQL request (and no thread safe).

This commit makes the Instrumentation instrument DataFetcher and make
them return a `DataFetcherResult` that holds a
`g.s.DataFetchingEnvironment#getLocalContext` with a reference to the
current data fetcher observation. A temporary fix is also applied in
`ContextDataFetcherDecorator` to merge both global and local contexts
when capturing a `ContextSnapshot` to be applied for the data fetching
operation.

Fixes gh-676
See gh-688
2023-05-10 14:50:45 +02:00
Brian Clozel
a56ff6e58d Fix DataFetcher observations hierarchy
Prior to this commit, the `GraphQlObservationInstrumentation` would
organize the parent/child relationship between data fetcher observations
by setting the current observation under a well-known key in the global
GraphQL context.

In some cases, the order of execution and the scheduling of operations
does not reflect the actual operation hierarchy as defined by the
GraphQL `ExecutionStepInfo`. This would result in traces where data
fetching operations are set with incorrect parent/child relationships.

This commit ensures that data fetcher observations have their parent set
with the expected one, by keeping track of active observations and using
the `ExecutionStepInfo` path as a key.

Fixes gh-676
2023-04-24 22:51:24 +02:00
Brian Clozel
4e5aaeddab Revisit request observation context type
Prior to this commit, the request execution observation would have a
context of type `RequestReplyReceiverContext` to directly deal with
tracing propagation at the transport level. This approach doesn't work
anymore as the parent observation is not properly set on the resulting
trace, even if it is manually set in the instrumentation.

This commit revisits the request observation setup and turns its context
into a regular `Observation.Context`. Tracing propagation should be
dealt with directly at the transport level by an underlying observation.
This is the case already for Spring Framework HTTP server observations.

As a result, the `PropagationWebGraphQlInterceptor` is deprecated with
no replacement and should not be used anymore.

Fixes gh-675
2023-04-24 22:03:34 +02:00
rstoyanchev
c650db895b Add link in documentation to Apollo federation sample
Closes gh-384
2023-04-14 08:27:17 +01:00
rstoyanchev
b7d1e6e9d2 Pass attributes in HttpGraphQlTransport
Closes gh-659
2023-04-14 06:59:34 +01:00
rstoyanchev
4a0d01a33b Fix auto-registration issue with non-null List
Closes gh-661
2023-04-14 06:55:36 +01:00
Spring Builds
db55ee2c2c Next development version (v1.1.4-SNAPSHOT) 2023-03-21 10:22:40 +00:00
Brian Clozel
d28d9091d7 Upgrade dependencies
This commit upgrades mandatory and optional dependencies:

* Spring Framework 6.0.7
* GraphQL Java 19.3
* Reactor 2022.0.5
* Micrometer 1.10.5
* Micrometer Tracing 1.0.3
* Spring Data 2022.0.3
* Spring Security 6.0.2

Closes gh-641
Closes gh-642
Closes gh-643
Closes gh-644
Closes gh-645
Closes gh-646
Closes gh-647
2023-03-20 18:20:43 +01:00
rstoyanchev
7fc4df74a6 Add request attributes to WebGraphQlRequest
Closes gh-633
2023-03-14 08:17:02 +00:00
rstoyanchev
66b3c82280 Add cookies to WebGraphQlRequest
Closes gh-626
2023-03-10 16:04:40 +00:00
rstoyanchev
2e229fec26 Polishing contribution
Closes gh-604
2023-03-08 13:31:12 +00:00
Koen Punt
345052381d Fix issue returning CompletableFuture
See gh-604
2023-03-08 13:28:05 +00:00
rstoyanchev
581b1108f2 Ensure resolved bean instance is used for validation
Closes gh-624
2023-03-06 20:30:56 +00:00
rstoyanchev
3b100c6047 Update Java version in .sdkmanrc
Closes gh-622
2023-03-02 12:18:07 +00:00
Tim te Beek
27f0f64c81 Use SpringJunitConfig in tests
Co-authored-by: Moderne <team@moderne.io>

See gh-622
2023-03-02 12:18:07 +00:00
Spring Builds
707bc36d6b Next development version (v1.1.3-SNAPSHOT) 2023-02-21 10:52:10 +00:00
Brian Clozel
312446ffa2 Upgrade to Spring Data 2022.0.2
Closes gh-617
2023-02-21 11:41:56 +01:00
Brian Clozel
0e358393cb Upgrade to Reactor 2022.0.3
Closes gh-616
2023-02-21 11:41:26 +01:00
Brian Clozel
a959e749fe Upgrade to Spring Framework 6.0.5
Closes gh-618
2023-02-21 11:40:52 +01:00
rstoyanchev
dc90558d9a Configure ExecutionInput in ExecutionGraphQlServiceTester
Closes gh-615
2023-02-16 18:20:45 +00:00
Brian Clozel
44ff134b92 Upgrade CI image to Ubuntu Jammy 2023-02-20 11:45:39 +01:00
Brian Clozel
7d87d3b29d Upgrade OCI build task in CI pipeline
This commit upgrades the OCI build task Concourse resource to 0.11.1 and
configures the Docker credentials for this task.
2023-02-20 11:43:37 +01:00
Brian Clozel
beafa43f25 Upgrade other dependencies
* Spring Framework 6.0.4
* Spring Data 2022.0.1
* Jackson 2.14.2
* Reactor 2022.0.2
2023-02-14 16:06:14 +01:00
Brian Clozel
e3b73e84e1 Upgrade to Micrometer Tracing 1.0.2
Closes gh-614
2023-02-14 16:04:57 +01:00
Brian Clozel
7489e95d9c Upgrade to Context Propagation 1.0.2
Closes gh-613
2023-02-14 16:04:24 +01:00
Brian Clozel
1d3701d3b4 Upgrade to Micrometer 1.10.4
Closes gh-612
2023-02-14 16:03:42 +01:00
Brian Clozel
1d2fc21d0b Fix parent Observation management in instrumentation
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
2023-02-14 15:45:25 +01:00
Brian Clozel
bcd6bad54a Consistently use Docker creds for fetching images 2023-02-14 10:11:48 +01:00
Brian Clozel
52dce6bcf8 Configure Docker credentials when fetching Concourse resources 2023-02-01 15:31:23 +01:00
Brian Clozel
a4f04293e0 Update CI to use the new 1.1.x branch
This commit updates the Concourse CI pipeline to use the new 1.1.x
branch for this generation, as the main branch is now dedicated to 1.2.x
features.
2023-02-01 14:45:51 +01:00
rstoyanchev
562d39a9a2 Revert "Remove ArgumentMapMethodArgumentResolver"
This reverts commit 7b30159109.
2023-02-01 09:46:14 +00:00
rstoyanchev
483ef31b5f Add link to Getting Started Guides
Closes gh-551
2023-02-01 09:44:29 +00:00
rstoyanchev
7b30159109 Remove ArgumentMapMethodArgumentResolver
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
2023-01-27 19:38:55 +00:00
rstoyanchev
4c3e75a1e9 Add MethodParameter validation
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
2023-01-27 19:38:55 +00:00
rstoyanchev
f65b83f65e Optimize performance of method validation
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
2023-01-27 19:38:55 +00:00
Brian Clozel
4c1e7c56e5 Upgrade to spring-asciidoctor-backends 0.0.4
This release is available on Maven Central, whereas 0.0.3 is only
present on repo.spring.io/release.
2023-01-27 09:50:12 +01:00
Brian Clozel
e852fbd2c6 Upgrade Java 17 version in CI build 2023-01-19 09:55:00 +01:00
rstoyanchev
d9497ffd65 Add Boot Starter section to reference
Closes gh-598
2023-01-13 18:25:10 +00:00
rstoyanchev
e316cdf13b Switch order of sections in reference docs
Client and Testing after all others such as Security,
Observability, and GraalVM.
2023-01-13 16:05:36 +00:00
Brian Clozel
2c9a511aef Upgrade Gradle conventions & enterprise plugins 2023-01-13 14:32:35 +01:00
Brian Clozel
f8c3e496aa Upgrade to Kotlin 1.7.22 2023-01-13 14:30:22 +01:00
Brian Clozel
d64eb9b9cf Upgrade to Gradle 7.6 2023-01-13 14:24:30 +01:00