Commit Graph

1409 Commits

Author SHA1 Message Date
Brian Clozel
381c9f3cc0 Next development version (v1.3.4-SNAPSHOT) 2024-10-23 07:39:16 +02:00
Brian Clozel
fdceadf335 Fix typo in workflow 2024-10-22 16:07:54 +02:00
Brian Clozel
8423c15ef2 Add workflow for deleting a staged release on Artifactory 2024-10-22 16:01:19 +02:00
Brian Clozel
fa2780fffe Upgrade to Spring Security 6.3.4
Closes gh-1078
2024-10-22 11:16:25 +02:00
rstoyanchev
88d7ea7894 Pass localContext only if available
See gh-1066
2024-10-21 18:31:47 +01:00
rstoyanchev
58cce019ed Consistent Publisher error handling with SSE
Closes gh-1080
2024-10-18 16:37:24 +01:00
Brian Clozel
cb9afd0928 Upgrade to Spring Data 2024.0.5
Closes gh-1077
2024-10-18 13:59:12 +02:00
rstoyanchev
0d6605a079 Add timeout to WebFlux SSE handler
See gh-1079
2024-10-18 12:14:22 +01:00
rstoyanchev
3a0006bce0 Exposes timeout in GraphQlSseHandler
Closes gh-1079
2024-10-18 12:04:39 +01:00
rstoyanchev
c784612090 Polishing in GraphQlSseHandler
See gh-1067
2024-10-18 11:55:05 +01:00
Brian Clozel
3ea216c2d4 Upgrade optional dependencies
Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2024-10-17 19:13:38 +02:00
Brian Clozel
0b3a0c5d32 Upgrade to Reactor 2023.0.11
Closes gh-1075

Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2024-10-17 19:08:26 +02:00
Brian Clozel
e51950ac1c Upgrade to Micrometer 1.13.6
Closes gh-1076

Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2024-10-17 19:07:25 +02:00
Brian Clozel
405f786766 Upgrade to Spring Framework 6.1.14
Closes gh-1074

Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2024-10-17 18:55:05 +02:00
Brian Clozel
1cd63eaafb Upgrade to Gradle 8.10.2 2024-10-17 16:12:36 +02:00
Brian Clozel
fe4af8ac52 Propagate context to Dataloader in @BatchMapping
Prior to this commit, `@BatchMapping` controller methods would be
automatically registered as date fetchers delegating to data loader
calls. Those calls would not include the current local context or main
context. As a result, injecting the `BatchLoaderEnvironment` in the
controller method signature would not contain the `getKeyContext()`.

This commit ensures that dataloader calls not only use the current
source, but also the current local context/main context so that it will
be present in the key contexts map.

Fixes gh-1066
2024-10-17 12:29:02 +02:00
Brian Clozel
a210f77353 Cancel SSE publisher in case of async timeouts
Prior to this commit, the MVC `GraphQlSseHandler` would not react to
async request timeouts thrown by the Servlet container. This means that
when such timeouts happened, the SSE handler would still try to write to
the underlying response, whereas it was already recycled. This would
lead to NullPointerException thrown by the container.

This commit ensures that the SSE handler registers an async listener to
be notified of async timeouts and cancels the publisher as a result.
The SSE completion is not performed so as to let the client know that
the exchange did not complete and that it should re-subscribe.

Fixes gh-1067
2024-10-16 21:49:16 +02:00
Brian Clozel
2650eb5863 Allow Enum types to be injected as method parameter for Source
Prior to this commit, enum types would be rejected as possible source
arguments for schema mapping methods.

This is a valid use case and this commit removes this limitation.

Closes gh-1059
2024-10-14 18:22:59 +02:00
Brian Clozel
3a603e7a94 Upgrade to GraphQL Java 22.3
CLoses gh-1044
2024-10-14 15:18:42 +02:00
Brian Clozel
d7ed85045b Produce INTERNAL_ERROR observation outcome
Prior to this commit, the `DefaultExecutionRequestObservationConvention`
would only produce "INTERNAL_ERROR" outcomes if the response is null or
if an unresolved exception remains.

The `ExceptionResolversExceptionHandler` will catch all unresolved
exceptions and add them to the errors map with the
`ErorType.INTERNAL_ERROR` error type. This means that the
"INTERNAL_ERROR" outcome is never used.

This commit ensures that this outcome is also used if at least one
resolved error is of `ErorType.INTERNAL_ERROR`.

Fixes gh-1058
2024-10-09 12:25:01 +02:00
Brian Clozel
d3cd569e94 SSE and WS handlers cancel when client disconnects
Prior to this commit, Server Sent Events and WebSocket handlers for MVC
would not behave properly in case the client disconnects while the
response is written to. This would throw an `IOException` processed by
the `BaseSubscriber` handlers, but would not actively cancel the
upstream publisher. This means the publisher would keep publishing
values even though it is not possible to write to the connection
anymore.

This commit ensures that any exception triggers a cancel signal sent to
the upstream publisher to avoid such cases.

Fixes gh-1060
2024-09-26 14:20:44 +02:00
rstoyanchev
c340d85494 Handling for empty representations list
Closes gh-1057
2024-09-17 11:46:00 +01:00
rstoyanchev
ba1dcf0baf Document behavior when "first" and "last" present
Closes gh-1055
2024-09-16 12:08:37 +01:00
rstoyanchev
71b709253d Polishing documentation on pagination
See gh-1055
2024-09-16 12:07:38 +01:00
rstoyanchev
763877bee7 Improves generic type support in schema inspection
The fix targets cases when a method's return type has a generic
type, and the generic type is declared inline on the return type.
We need to pass containing class information as a ResolvableType
in order to be able to resolve generic types.

Closes gh-1037
2024-09-13 18:58:13 +01:00
rstoyanchev
579bb649bd Improve paginated type check in schema inspection
Closes gh-1053
2024-09-05 17:00:30 +01:00
Brian Clozel
1979e435c3 Upgrade to GraphQL Java 22.2
This also documents the new subscription ordering feature as reported
and requested in #949.

Closes gh-1044
2024-08-21 18:12:48 +02:00
Brian Clozel
311531b74f Move client and testing docs to compiled code snippets
Prior to this commit, the "client" and "testing" sections of the
reference documentation were using inline code snippets.
Because of this, several snippets were out of date or invalid.

This commit moves all those code snippets to actual Java classes
compiled with the documentation.

Fixes gh-1042
2024-08-21 10:44:54 +02:00
Brian Clozel
66cece6a2c Support application/graphql with charset information
Prior to this commit, gh-948 added a fallback support for the
"application/graphql" content-type sent by clients. This media type is
not widely used and advised against by the spec group.

This fallback checked for an exact match of the content type, not taking
into account potential media type parameters such as charset.

This commit ensure that a `MediaType#include` comparison is used to
trigger the fallback.

Fixes gh-1036
2024-07-26 15:38:11 +02:00
Brian Clozel
e455b698e4 Next development version (v1.3.3-SNAPSHOT) 2024-07-16 14:26:00 +02:00
Brian Clozel
7e07dd9280 Upgrade to Gradle 8.9 2024-07-16 13:54:58 +02:00
Brian Clozel
53ddbdb0c3 Upgrade to Spring Data 2024.0.2
Closes gh-1031
2024-07-16 13:47:29 +02:00
Brian Clozel
ed12f2698c Upgrade to Micrometer 1.13.2 and Tracing 1.3.2
Closes gh-1030
2024-07-16 13:47:09 +02:00
Brian Clozel
fd7a06be93 Upgrade to Reactor 2023.0.8
Closes gh-1029
2024-07-16 13:46:27 +02:00
Brian Clozel
449a589e78 Upgrade to Spring Framework 6.1.11
Closes gh-1028
2024-07-16 13:45:45 +02:00
Brian Clozel
07fe0e0a43 Polishing standalone setup documentation
See gh-606
2024-07-12 16:10:52 +02:00
Brian Clozel
c1ed773cc7 Document minimum standalone setup for GraphQL support
Most Spring for GraphQL applications use Spring Boot as a way to
auto-configure the required infrastructure for running GraphQL
applications.

This commit documents a minimal setup for Spring applications not
relying on Spring Boot. This assumes an existing infrastructure for a
Spring MVC application.

Closes gh-606
2024-07-12 16:06:48 +02:00
Brian Clozel
441b18d919 Merge branch '1.2.x' 2024-07-11 22:05:07 +02:00
Brian Clozel
ad60412e13 Add missing properties for released artifacts
See gh-1024
2024-07-11 22:00:38 +02:00
Brian Clozel
3923643e2e Migrate all workflows to GitHub Actions
This commit completes the migration from Concourse to GitHub Actions,
adding the CI variants and release workflows.

See gh-1024
2024-07-11 17:13:13 +02:00
Brian Clozel
09680e1c84 Migrate all workflows to GitHub Actions
This commit completes the migration from Concourse to GitHub Actions,
adding the CI variants and release workflows.

Closes gh-1024
2024-07-11 16:50:02 +02:00
rstoyanchev
a6508f4114 Perform hasDataLoaderRegistrations check at runtime
Closes gh-1020
2024-07-04 12:48:17 +01:00
rstoyanchev
34693e66f1 Perform hasDataLoaderRegistrations check at runtime
Closes gh-1020
2024-07-04 12:26:02 +01:00
rstoyanchev
06675e0243 SchemaMappingInspector detects Kotlin functions
Closes gh-995
2024-06-27 13:15:56 +01:00
rstoyanchev
719ac8fdab Improve Kotlin List detection for EntityMapping methods
Closes gh-1018
2024-06-27 13:15:56 +01:00
rstoyanchev
89a4494148 Polishing entity argument resolvers
Closes gh-996
2024-06-27 13:15:56 +01:00
rstoyanchev
8d8432db44 Consistent logging in annotated exception handler
This commit aligns DEBUG logging of exceptions resolved via annotated
exception handler methods with ExceptionResolversExceptionHandler and
the reference documentation.

Closes gh-996
2024-06-27 13:15:56 +01:00
rstoyanchev
9f49103c65 Polishing in exception handling
See gh-996
2024-06-27 13:15:56 +01:00
Hantsy Bai
1dcc2ddc3a Update transports.adoc
fix `GraphQlWebFluxAutoConfiguration` format in websocket section.
2024-06-25 09:54:56 +01:00
Brian Clozel
2354970802 Update link to Spring Boot Javadocs 2024-06-20 10:27:51 +02:00