Commit Graph

1317 Commits

Author SHA1 Message Date
Spring Builds
da473ca00b Next development version (v1.3.1-SNAPSHOT) 2024-05-21 12:37:18 +00:00
rstoyanchev
5609aff32e Upgrade dependencies
Closes gh-976, gh-977, gh-978, gh-979
2024-05-21 10:41:22 +01:00
rstoyanchev
97be2d92e0 Upgrade to GraphQL Java 22.1
Closes gh-975
2024-05-21 09:37:22 +01:00
rstoyanchev
4d2cde83e4 Polishing contribution
Closes gh-969
2024-05-21 08:38:40 +01:00
kutlueren
1318ca4316 Allow Map of variables in GraphQlTester
See gh-969
2024-05-21 07:03:15 +01:00
rstoyanchev
987f88d22d Merge branch '1.2.x' 2024-05-20 16:57:45 +01:00
rstoyanchev
6d9a8a2b74 Forward compatibility with GraphQL Java 21
Closes gh-974
2024-05-20 16:55:23 +01:00
rstoyanchev
84dac20b7b Fix compiler "deprecation" warnings 2024-05-20 16:33:46 +01:00
Dariusz Kuc
4e53faf63b Upgrade federation-jvm to 5.0.0
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.
2024-05-20 16:29:59 +01:00
rstoyanchev
55482cca1a Fix checkstyle issue 2024-05-20 13:46:35 +01:00
rstoyanchev
320bce7348 Merge branch '1.2.x' 2024-05-20 13:40:42 +01:00
rstoyanchev
33bdea9556 Consistent catch handling in InvocableHandlerMethodSupport
Closes gh-973
2024-05-20 13:11:20 +01:00
rstoyanchev
abcc38428d Merge branch '1.2.x' 2024-05-20 12:25:54 +01:00
rstoyanchev
91b6beb2b2 Fix test failure only seen on CI
The failure was in GraphQlWebSocketHandlerTests for WebMvc.
the subscriptionExists test checks that a second subscription with
same id will close the connection with 4409. It also checks that
2 messages have arrived (connection_init) and one message from the
first subscription. However, since message handling as async,
handling of the two subscriptions is concurrent, and the connection
may be closed before the first subscription is able to send.

This commit adjusts the message checks to be more lenient and
accept between 1 and 2 messages.
2024-05-20 12:23:36 +01:00
rstoyanchev
f9a34efe1f Merge branch '1.2.x' 2024-05-18 13:08:08 +01:00
rstoyanchev
aa1ee77867 Document how to configure custom ExecutionStrategy
Closes gh-832
2024-05-18 13:05:02 +01:00
rstoyanchev
dd2a3d21d5 Tests and docs for AuthenticationWebSocketInterceptor
Closes gh-268
2024-05-17 14:18:58 +01:00
rstoyanchev
1171aee9e2 Add AuthenticationWebSocketInterceptor
See gh-268

Co-authored-by: Josh Cummings <josh.cummings@gmail.com>
2024-05-17 10:50:24 +01:00
rstoyanchev
f35495004c Improve logging of controller method mappings 2024-05-08 21:05:38 +01:00
rstoyanchev
f4c6fca42f Update docs for blocking controller method support
See gh-958
2024-05-07 17:45:57 +01:00
rstoyanchev
bbea54b298 Controller method async execution on Java 21+
Closes gh-958
2024-05-07 17:24:58 +01:00
rstoyanchev
a323d22f69 Fix GraphQL Java 21 compatibility issue
Closes gh-963
2024-05-06 21:22:06 +01:00
rstoyanchev
0ab80ee5ce Improve class mapping in SchemaMappingInspector 2024-05-03 20:01:56 +01:00
rstoyanchev
dceb3aff94 Correctly report skipped concrete union/interface types
Closes gh-962
2024-05-03 15:12:21 +01:00
rstoyanchev
9bcd8242ef Polishing in SchemaMappingInspector 2024-05-03 12:15:19 +01:00
rstoyanchev
ac3fabbce0 Improve check for duplicate unmapped field
Closes gh-961
2024-05-03 12:15:19 +01:00
rstoyanchev
9bdd869316 Suppress SpringMethodVisibility
Although not necessary from compiler perspective, visibility modifiers
in private classes intentional. Although not enforced, it helps to
make clarify the internal API.
2024-05-02 17:49:54 +01:00
rstoyanchev
816c202f57 Refactoring in SchemaMappingInspector
Functionally neutral refactoring. Consolidate logic to initialize
union/interface metadata, better encapsulation, and readability.
2024-05-02 17:46:15 +01:00
rstoyanchev
79854ec036 Minor update related to schema inspection
The change updates the registration of explicit mappings from
any registered ClassNameTypeResolver's.

1. Check if there are any explicit mappings
2. Check all TypeResolver's

Also, change factory method to make it more clear that all it
needs from a ClassNameTypeResolver are the explicit mappings.
2024-05-02 17:01:33 +01:00
rstoyanchev
0748a129dc Improve union support of SchemaMappingInspector
If the union controller method returns Object, as a fallback
try the package of the controller.

See gh-960
2024-05-02 16:10:19 +01:00
rstoyanchev
b8c4899475 Update docs for Kotlin method signatures
See gh-954
2024-05-01 08:01:05 +01:00
rstoyanchev
0413950b2e Improved support and tests for Kotlin controllers
Mostly it worked already due to the use of
CoroutinesUtils.invokeSuspendingFunction, except for a couple of
issues with BatchMapping detection on startup.

Closes gh-954
2024-04-30 19:57:17 +01:00
rstoyanchev
a280215e1f Polishing in InvocableHandlerMethodSupport 2024-04-29 15:12:25 +01:00
rstoyanchev
14c87b0935 Polishing in GraphQlHttpHandler 2024-04-26 14:36:25 +01:00
rstoyanchev
1ea64dca5c Add protected encode method to WebFlux AbstractGraphQlHttpHandler
This helps to encode directly when needed, e.g. for multipart
stream with incremental delivery.

See gh-959
2024-04-26 12:02:10 +01:00
rstoyanchev
f61dfc56fe Align future handling with AsyncServerResponse
See gh-959
2024-04-25 12:33:56 +01:00
rstoyanchev
21a7c81062 Move handleRequest up to AbstractGraphQlHttpHandler
Closes gh-959
2024-04-25 12:29:44 +01:00
rstoyanchev
6376ec9054 Refactoring in server handlers
In preparation to move handleRequest method up.

See gh-959
2024-04-25 11:03:42 +01:00
rstoyanchev
432d982579 Polishing federation section of the reference
See gh-922
2024-04-24 09:33:15 +01:00
rstoyanchev
b1cb364ab4 Update GraphQlRequestPredicates to map application/graphql content
Closes gh-948
2024-04-22 16:02:53 +01:00
rstoyanchev
03c11d0876 Merge branch '1.2.x' 2024-04-22 13:07:52 +01:00
rstoyanchev
7dd9cf54ca Support application/graphql for request body
Closes gh-948
2024-04-22 12:30:34 +01:00
rstoyanchev
bf9c584919 Minor refactoring in HTTP handler tests
Change WebFlux handler to actually decode from JSON rather
than take an already decoded SerializableGraphQlRequest.

See gh-948
2024-04-22 12:30:05 +01:00
Brian Clozel
5977b2d8b7 Register runtime hints for @EntityMapping methods
Since the introduction of `@EntityMapping` support on controller
handlers, we need to support such variants for the GraalVM Native case.

This commit registers the relevant hints for runtime reflection support
with GraalVM Native.

Closes gh-928
2024-04-19 18:18:09 +02:00
Brian Clozel
c9556035ca Configure interceptors on WebSocketGraphQlTester
This commit adds two new methods on the `WebSocketGraphQlTester` builder
to configure `GraphQlClientInterceptor` instances on the client.
For now, this is only accessible on the WebSocket tester but could be
promoted to a higher level builder in the future.

Closes gh-823
2024-04-19 15:34:07 +02:00
Brian Clozel
fbb08c4c46 Merge branch '1.2.x' 2024-04-16 17:33:20 +02:00
Brian Clozel
8eb3cfd19d Update build status badge in README 2024-04-16 17:31:44 +02:00
Brian Clozel
288c1f1705 Merge branch '1.2.x' 2024-04-16 17:26:14 +02:00
Brian Clozel
2cb43e9368 Polishing
See gh-863
2024-04-16 17:26:00 +02:00
Brian Clozel
b8b4774f11 Merge branch '1.2.x' 2024-04-16 17:17:38 +02:00