Commit Graph

1160 Commits

Author SHA1 Message Date
Brian Clozel
c55de8d091 Record response errors as events in Request Observations
Prior to this commit, GraphQL Request Observations would not record
errors as Observation errors, because with GraphQL errors can partially
affect the response and there can be multiple. Instead, an invalid
request (for example) would lead to a `"graphql.outcome", "REQUEST_ERROR"`
low cardinality KeyValue. In this case, developers would not know what
type of error occured nor if there were multiple.

This commit records all errors listed in the GraphQL as
Observation.Event on the request Observation. Such events are usually
handled by the tracing handler and are recorded as span annotations for
traces. Other `ObservationHandler` annotations can leverage events in a
different fashion.

Closes gh-859
2024-02-14 14:06:21 +01:00
Brian Clozel
98d39bc21d Remove Context Propagation deprecated API usage
Prior to this commit, gh-676 fixed the local and global context
inheritance in the `ContextDataFetcherDecorator` with a workaround.
This commit undoes this workaround and uses the new Context Propagation
API for this, effectively raising the requirement for version 1.0.3 and
removing all deprecated APIs in the meantime.

Closes gh-688
2024-02-14 14:06:13 +01:00
Brian Clozel
610898c4c3 Merge branch '1.2.x' 2024-02-14 14:05:45 +01:00
Brian Clozel
5248a3253b Polish SerializableGraphQlRequest for GraalVM support
This commit improves the `SerializableGraphQlRequest` by declaring its
reflection usage for GraalVM native applications.

See gh-905
2024-02-14 14:05:36 +01:00
Brian Clozel
5b7e2633c7 Merge branch '1.2.x' 2024-02-14 14:02:08 +01:00
rstoyanchev
fb1f0ee0e7 Deserialize HTTP request body to POJO
Closes gh-905
2024-02-08 20:54:55 +00:00
rstoyanchev
b983095005 Merge branch '1.2.x' 2024-02-08 11:50:06 +00:00
rstoyanchev
1736d2abf0 WebMvc handler skips ASYNC if possible
Closes gh-904
2024-02-08 11:14:38 +00:00
rstoyanchev
d836f6879e Add documentation for federation support
Closes gh-864
2024-02-06 20:46:59 +00:00
Dariusz Kuc
784b637e41 chore: update to federation jvm 4.4.0
`v4.4.0` adds support for Federation v2.6 and v2.7. This version also includes performance fix to federating tracing instrumentation (`ftv1`) that skips unnecessary computations.
2024-02-06 12:31:01 +00:00
rstoyanchev
159ebaa278 Add federation support
See gh-864
2024-02-05 17:12:33 +00:00
rstoyanchev
254d0c87c5 Refactoring in argument binding
GraphQlArgumentBinder allows external determination of the raw value to use,
and ArgumentMethodArgumentResolver allows customizing the invocation of
the binder.

See gh-864
2024-02-05 17:12:04 +00:00
rstoyanchev
038217a686 Move AnnotatedControllerExceptionResolver to base class
See gh-864
2024-02-05 17:10:51 +00:00
rstoyanchev
9aa506a280 Extract base classes for annotated controller methods
See gh-864
2024-02-05 17:09:24 +00:00
rstoyanchev
19da1deea9 Merge branch '1.2.x' 2024-01-31 20:02:35 +00:00
rstoyanchev
3279332901 SchemaMappingInspector accepts Map of registrations
Closes gh-894
2024-01-31 20:02:20 +00:00
rstoyanchev
87aa98b1d8 Update docs for synchronous GraphQlClient
Closes gh-771
2024-01-31 18:43:34 +00:00
rstoyanchev
08d831aed3 Polishing
See gh-771
2024-01-31 15:08:54 +00:00
rstoyanchev
a38fac0bb1 Introduce blocking execution in GraphQlClient
See gh-771
2024-01-31 15:07:42 +00:00
rstoyanchev
117445b962 Add SyncGraphQlTransport and Interceptor
See gh-771
2024-01-31 15:07:28 +00:00
rstoyanchev
d460cf0b9b Add RestClient transport and GraphQlClient builder
See gh-771
2024-01-31 15:07:11 +00:00
rstoyanchev
c48b2979c8 Merge branch '1.2.x' 2024-01-30 09:25:13 +00:00
rstoyanchev
78f7df2736 Consistently check errors in GraphQlTester
Closes gh-891
2024-01-30 09:24:26 +00:00
rstoyanchev
1e2b5f8bc5 Upgrade dependencies
Closes gh-883
Closes gh-884
Closes gh-885
Closes gh-886
Closes gh-887
Closes gh-888
Closes gh-889
Closes gh-890
2024-01-26 11:42:29 +00:00
rstoyanchev
84964544dc Merge branch '1.2.x' 2024-01-26 10:02:04 +00:00
Nils Hartmann
b37a06bf59 ExecutionGraphQlService instead of GraphqlService
See gh-877
2024-01-26 09:59:53 +00:00
Brian Clozel
2e5090a0e3 Start Publishing 1.3.0-SNAPSHOT 2024-01-26 10:12:45 +01:00
Brian Clozel
e3f672e019 Track 1.2.x branch in CI pipeline 2024-01-26 10:09:53 +01:00
Brian Clozel
311e5647b4 Upgrade CI to JDK 17.0.10+13 and 21.0.2+14 2024-01-26 10:06:06 +01:00
Brian Clozel
9908707430 Upgrade CI to Docker 25.0.1 2024-01-26 10:05:06 +01:00
Brian Clozel
5b07edc81d Upgrade CI to Ubunutu Jammy 20240111 2024-01-26 10:04:38 +01:00
rstoyanchev
1126893f72 SchemaMappingInspector is public
Closes gh-881
2024-01-23 19:24:49 +00:00
Eric Haag
4ccf8fa84d Add Revved up by Develocity badge 2024-01-23 18:46:23 +00:00
rstoyanchev
b7842ff72f Fix count and offset calculations for backwards pagination
Closes gh-873
2024-01-19 21:19:09 +00:00
rstoyanchev
5fcf803680 AbstractGraphQlSourceBuilder is public
Builder implementations are intended to be package private and exposed
through interface methods, but the abstract class needs to be public
for alternative implementations.
2024-01-18 08:35:43 +00:00
rstoyanchev
e798a00d48 Refactor how SchemaGenerator is invoked
Closes gh-878
2024-01-17 17:30:24 +00:00
Brian Clozel
e054fe13cf Unwrap Optional types for schema inspection
Prior to this commit, return types declared by controller handlers that
were wrapped with `Optional` were not considered during the schema
analysis and would result in false positives in the schema inspection
report, stating that relevant fields were unmapped.
This is especially relevant for controller handlers returning optional
values from Spring Data repositories.

This commit ensures that `java.util.Optional` types are unwrapped and
that wrapped types are considered during the analysis.

Fixes gh-875
2024-01-12 12:27:43 +01:00
rstoyanchev
b326771f9e Update section on code generation
Closes gh-847
2023-12-07 10:16:40 +00:00
Brian Clozel
9fee07989d Fix ConnectionFieldTypeVisitor traversal control
Prior to this commit, the `ConnectionFieldTypeVisitor` would return
`TraversalControl.ABORT` when a field with a parent Subscription type is
encountered. This is done because this visitor should not consider
fields under Subscription types as they are not candidates for
pagination. This would also completely abort the visiting of all fields
under Subscription types, for all other visitors. As a result, this
prevents the decoration of data fetchers by the `ContextTypeVisitor` and
leads to missing context information (security or observability).

This only applies to 21.x GraphQL Java versions, as a bug was hiding
this behavior in previous versions.

This commit ensures that the `ConnectionFieldTypeVisitor` ignores fields
located under Subscription operations but always return
`TraversalControl.CONTINUE` to not completely ignore this part of the
schema.

Fixes gh-861
2023-12-04 13:58:56 +01:00
Spring Builds
d7606f9b92 Next development version (v1.2.5-SNAPSHOT) 2023-11-21 13:43:41 +00:00
Brian Clozel
84c4b4f6dd Fix JDK script in CI pipeline 2023-11-21 11:38:42 +01:00
Brian Clozel
44e8811a29 Upgrade to Context Propagation 1.0.6
Closes gh-857
2023-11-21 11:35:38 +01:00
Brian Clozel
08a5ea41bf Upgrade to Spring Security 6.1.5
Closes gh-856
2023-11-21 11:35:05 +01:00
Brian Clozel
45f579f68e Upgrade to Spring Data 2023.0.6
Closes gh-855
2023-11-21 11:34:41 +01:00
Brian Clozel
19ab9a5f68 Upgrade to Micrometer Tracing 1.1.7
Closes gh-854
2023-11-21 11:33:54 +01:00
Brian Clozel
3137a611d1 Upgrade to Micrometer 1.11.6
Closes gh-853
2023-11-21 11:33:07 +01:00
Brian Clozel
e82ceaa42c Upgrade to Reactor 2022.0.13
Closes gh-858
2023-11-21 11:32:06 +01:00
Brian Clozel
b0b077c6dd Upgrade to GraphQL Java 20.7
Closes gh-852
2023-11-21 11:27:26 +01:00
Brian Clozel
001daac186 Upgrade to Spring Framework 6.0.14
Closes gh-851
2023-11-21 11:26:50 +01:00
Brian Clozel
7a749dc161 Upgrade CI pipeline 2023-11-21 10:33:14 +01:00