Commit Graph

1114 Commits

Author SHA1 Message Date
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
rstoyanchev
779cc761ba Add reference docs section on codegen
Closes gh-847
2023-11-20 21:37:57 +00:00
rstoyanchev
acdd2a19bc Polishing contribution
Closes gh-849
2023-11-20 16:57:11 +00:00
Stmated
47aa333df7 Lenient integer parsing in ResponseMapGraphQlResponse
See gh-849
2023-11-20 13:09:59 +00:00
rstoyanchev
d2eaf3c2bc Fix reconnect issue in WebSocketGraphQlTransport
Closes gh-826
2023-10-27 16:40:41 +01:00
rstoyanchev
eee7f09e90 Refine hasPrevious/hasNext for keyset scrolling
Closes gh-843
2023-10-26 12:28:02 +01:00
Koen Punt
966276c01b Allow null arguments in ValueExtractor
`isPresent()` returns false, even when an explicit `null` value is
supplied. By checking `isOmitted()` instead, we can correctly use
validation annotations like `@NotBlank`.

Closes gh-842
2023-10-25 16:41:04 +01:00
rstoyanchev
2a99c1ffa0 Fix backward scroll calculations for offset positions
1. Offset to be advanced back by 1 more than the count in order to
exclude the item at the specified offset.
2. Count to be adjusted down if offset is too low.
3. Count to be set to 0 if offset is 0.

See gh-840
2023-10-19 12:51:29 +01:00
rstoyanchev
7ddb1a9941 ConnectionDataFetcher supports DataFetcherResult
Closes gh-835
2023-10-19 12:51:29 +01:00
Nils Hartmann
80b1c27149 Use ScrollPosition.offset() to get initial scroll position 2023-10-18 16:31:50 +01:00
Nils Hartmann
c5878c3824 Fix typo 2023-10-18 16:29:06 +01:00
rstoyanchev
c2f0b54e5f Allow custom DataLoaderRegistry
Closes gh-836
2023-10-16 17:13:59 +01:00
Brian Clozel
4912588a8a Fix GraalVM reflection metadata for GraphQL client
Prior to this commit, the embedded reachability metadata for GraalVM
would declare a reflection hint for `GraphQlWebSocketMessage` when the
RSocket or WebSocket clients are reachable.
The `CodecDelegate` relies on this message class to test codecs and
detect a JSON-capable instance. This is true for all supported
GraphQlClient implementations.

This commit revisits the embedded reachability metadata to:

* allow reflection on `GraphQlWebSocketMessage` if any client extending
  `AbstractGraphQlClientBuilder` is available
* allow reflection on `GraphQlWebSocketMessage` if a
  `GraphQlWebSocketHandler` is reachable

Fixes gh-825
2023-10-13 23:13:30 +02:00
Brian Clozel
6c15e0931a Order ControllerAdvice beans in controller support
Prior to this commit, the `AnnotatedControllerExceptionResolver` would
scan the application context for `@ControllerAdvice` beans and cache the
results in an unordered Map. It's later iterating over the entries to
resolve an exception handler at runtime.

This commit ensures that such entries are now stored in an ordered map,
using the `OrderComparator.INSTANCE` comparator. `ControllerAdvice`
beans will be iterated over the order specified by the `Ordered`
contract or the `@Order` annotation.

Fixes gh-830
2023-10-02 10:16:25 +02:00
Rob Winch
06e485be7a Use GITHUB_TOKEN 2023-09-19 20:09:11 +01:00
Rob Winch
796587b112 Add deploy-docs.yml 2023-09-19 19:52:58 +01:00
Spring Builds
5bbf29b189 Next development version (v1.2.4-SNAPSHOT) 2023-09-19 08:35:40 +00:00
rstoyanchev
9fc2d3b9d7 ConnectionTypeDefinitionConfigurer supports type extensions
Closes gh-816
2023-09-18 17:42:09 +01:00
rstoyanchev
9d34402545 Send Pong via scheduler for the session
Single threaded scheduler for serial sending, avoiding concurrent
sends that are not allowed by the WebSocket runtime.

Closes gh-793
2023-09-15 16:59:19 +01:00
Simon Verhoeven
e48004f0bf doc: fix method name 2023-09-18 13:09:55 +01:00
Brian Clozel
3c398593b5 Upgrade to Hibernate 6.2.8.Final 2023-09-17 17:55:59 +02:00
Brian Clozel
8827547ac3 Upgrade to Context Propagation 1.0.5
Closes gh-815
2023-09-17 17:55:11 +02:00
Brian Clozel
d51de8f964 Upgrade to Spring Security 6.1.3
Closes gh-814
2023-09-17 17:54:50 +02:00
Brian Clozel
b007b7c818 Upgrade to Spring Data 2023.0.4
Closes gh-813
2023-09-17 17:54:03 +02:00
Brian Clozel
f3455eb4fd Upgrade to Micrometer 1.11.4 and Tracing 1.1.5
Closes gh-812
2023-09-17 17:53:18 +02:00
Brian Clozel
e489203523 Upgrade to Reactor 2022.0.11
Closes gh-811
2023-09-17 17:52:24 +02:00
Brian Clozel
bfbf4cf9f8 Upgrade to GraphQL Java 20.6
Closes gh-810
2023-09-17 17:51:16 +02:00
Brian Clozel
111d05d216 Upgrade to Spring Framework 6.0.12
Closes gh-809
2023-09-17 17:50:37 +02:00
Brian Clozel
e14bfa1959 Upgrade CI image to Java 17.0.8 2023-09-17 17:48:46 +02:00
Brian Clozel
8ac3b3784b Upgrade CI image to Ubuntu jammy-20230816 2023-09-17 17:48:14 +02:00
rstoyanchev
fcb11a4ee7 Fix test failures
Adjust tests with Principal to express nullability or
to provide it. In addition, Mono should not be treated
as a required parameter.

Closes gh-790
2023-09-14 20:06:58 +01:00
rstoyanchev
a960132179 Polishing contribution
See gh-790
2023-09-14 20:06:58 +01:00
Koen Punt
c2443326eb Raise exception if Principal is required but not present
See gh-790
2023-09-14 20:06:58 +01:00
rstoyanchev
ab392461ab Polishing contribution
Closes gh-653
2023-09-14 15:03:33 +01:00
Koen Punt
e7d72534e7 Support use of dataloader from suspend function
Rudimentary implementation to support returning a `CompletableFuture`
from a suspend function.

`CoroutinesUtils.invokeSuspendingFunction` wraps the return value of
the function in a `Mono` (or `Flux`). But it also does this when a
`CompletableFuture` is returned, and thus results in a
`Mono<CompletableFuture<?>>`, which isn't captured by graphql-java,
and thus the dataloader is never dispatched.

By unwrapping the future, and _converting_ it to a mono (as opposed
to wrapping), the dataloader is dispatched correctly.

See gh-653
2023-09-14 15:03:33 +01:00
rstoyanchev
71b1f5868b Fix IndexOutOfBoundsException for empty Window
Closes gh-775
2023-09-01 16:38:35 +01:00
rstoyanchev
a079d442c8 Polishing
See gh-788
2023-09-01 10:18:50 +01:00
rstoyanchev
2539d95f27 Refactoring in DefaultBatchLoaderRegistry
Closes gh-788
2023-08-31 18:09:30 +01:00
Brian Clozel
32ed3e967e Do not rewrap CompletionException in DataFetcher instrumentation
This commit ensures that, when an instrumented DataFetcher returns a
`CompletionException`, we do not re-wrap it with the same exception
type. This aligns with the behavior enforced in the JDK
`CompletableFuture`.

Fixes gh-780
2023-08-28 12:25:38 +02:00
Brian Clozel
1032f99b6d Polish
See gh-759
2023-08-21 17:43:40 +02:00
roksui
8038be2796 Change WebGraphQlServiceTester to WebGraphQlTester
Closes gh-759
2023-08-21 17:09:01 +02:00
roksui
b200ec9eca Fix typo in README.md 2023-08-21 17:07:53 +02:00
Brian Clozel
89d5b7e9df Support CSRF protection in GraphiQL with cookie-to-header strategy
Prior to this commit, secured applications with CSRF protection could
not easily use the GraphiQL integration shipped with Spring for GraphQL,
as the JavaScript code would not work with any CSRF protection strategy
for single page apps.

This commit checks whether the main HTTP response contains a
`XSRF-TOKEN` Cookie value, and uses it as a `X-XSRF-TOKEN` request
header for the next AJAX request to the `/graphql` endpoint.

Note that a specific configuration must be set in Spring Security to
achieve that:
* the CSRF token must be sent as a response Cookie for the initial
  authenticated request
* if the application is protected against BREACH, all new token values
  must be sent as response cookies as well and a request handler must be
  configured

Closes gh-758
2023-08-18 20:51:26 +02:00
Brian Clozel
bb819f9327 Add GraphiQL Explorer plugin in embedded integration
Closes gh-777
2023-08-18 20:50:47 +02:00
Brian Clozel
130e08f109 Upgrade to React 18 in GraphiQL embedded integration
Closes gh-776
2023-08-18 20:48:36 +02:00
Brian Clozel
df5748cc5e Update links to reference docs in README 2023-08-18 14:47:04 +02:00
Siva Kumar Edupuganti
f406e63e78 Added getting support links
Closes gh-621
2023-08-18 14:44:34 +02:00