Commit Graph

1071 Commits

Author SHA1 Message Date
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
Brian Clozel
95f40e750b Upgrade to Gradle 8.3 and Gradle plugins
This commit upgrades the build to:

* Gradle 8.3
* Gradle Spring conventions 0.0.14
* Gradle Enterprise plugin 3.12.6
2023-08-18 11:39:06 +02:00
Brian Clozel
94e9a8d2d7 Set current observation in data fetching environment
Prior to this commit, the Observability instrumentation would instrument
`DataFetcher` instances and set the current observation in the local
context of the value returned by the data fetcher itself.
This allowed to properly build a parent/child chain of observations
between the main request and the instrumented data fetching
observations.

Because the current observation was not set in the
`DataFetchingEnvironment` given as a parameter to the data fetcher, any
operation done in the data fetcher would not propagate using the current
observation but instead the parent one.

This commit revisits the implementation of the instrumentation to not
wrap the result anymore, but to build a new local `GraphQLContext` that
holds the current observation right before calling the data fetcher.
Note that we cannot "just" set the current observation in that local
context as this is shared mutable instance for all child data fetchers.

Fixes gh-757
2023-08-17 18:21:41 +02:00
Brian Clozel
94ba9fed8f Add test case for gh-761
This commit also ensures that a new local context is created, copying
the existing values. This avoids mutating the parent local context and
polluting it with local values.
This could cause unintended side effects on other child datafetchers.

Fixes gh-761
2023-08-16 20:18:09 +02:00
Koen Punt
58bd58bef0 Inherit local context from environment in instrumentation
Prior to this commit, a `DataFetcher` instrumented by the
`GraphQlObservationInstrumentation` would incorrectly overwrite the
local context when:

* the `DataFetcher` returns a value object (i.e. not a
  `DataFetcherResult`)
* the given `DatFetchingEnvironment` has an existing local context
with values

For this case, the instrumentation would create a new local context but
would not inherit from the existing local context.

See gh-761
2023-08-16 20:18:05 +02:00
Rob Winch
29fb3293f2 Fix include-code macro 2023-08-04 15:38:28 +01:00
Rob Winch
9a4b72935d Convert to Asciidoctor Tabs 2023-08-04 15:38:28 +01:00
Rob Winch
91feee745e use latest antora 2023-08-04 15:38:28 +01:00
Rob Winch
327a3588bc remove h2 from index.adoc 2023-08-04 15:38:28 +01:00
Rob Winch
d485fdf85b No warnings 2023-08-04 15:38:28 +01:00
Rob Winch
bb9aaaddc8 fix it 2023-08-04 15:38:28 +01:00
Rob Winch
6901f41c33 Fix cross references 2023-08-04 15:38:28 +01:00
Rob Winch
78508c4b18 Remove includes 2023-08-04 15:38:28 +01:00
Rob Winch
d4e75f1921 Generate a default navigation 2023-08-04 15:38:28 +01:00
Rob Winch
359f925a00 Copy default antora files 2023-08-04 15:38:28 +01:00
Rob Winch
295e725985 Remove unnecessary asciidoc attributes 2023-08-04 15:38:28 +01:00
Rob Winch
d628d22b3f Insert explicit ids for headers 2023-08-04 15:38:28 +01:00
Rob Winch
49446b7171 Migrate Structure 2023-08-04 15:38:28 +01:00
Spring Builds
edda403220 Next development version (v1.2.3-SNAPSHOT) 2023-07-18 14:33:56 +00:00
rstoyanchev
142ca8cd73 Add section on file uploads
Closes gh-747
2023-07-18 15:07:25 +01:00
rstoyanchev
db525f18f4 Fix incorrect nesting under Transports section 2023-07-18 12:42:18 +01:00
rstoyanchev
74e8c60b4e Support coroutine @GraphQlExceptionHandler methods
Closes gh-750
2023-07-18 12:18:31 +01:00
Brian Clozel
fdb7051ae3 Upgrade optional dependencies 2023-07-17 17:40:54 +02:00
Brian Clozel
ac2dd9ba72 Upgrade to Context Propagation 1.0.4
Closes gh-756
2023-07-17 17:40:32 +02:00
Brian Clozel
c1da2a309f Upgrade to RSocket 1.1.4
Closes gh-755
2023-07-17 17:36:02 +02:00
Brian Clozel
394f08bcf4 Upgrade to Spring Security 6.1.1
Closes gh-754
2023-07-17 17:35:24 +02:00
Brian Clozel
7bddba37f0 Upgrade to Spring Data 2023.0.2
Closes gh-753
2023-07-17 17:34:38 +02:00
Brian Clozel
a07dc73c9c Upgrade to Micrometer 1.11.2 and Tracing 1.1.2
Closes gh-752
2023-07-17 17:22:53 +02:00
Brian Clozel
98cba54a53 Upgrade to Reactor 2022.0.9
Closes gh-751
2023-07-17 17:21:38 +02:00
Brian Clozel
956d50404f Upgrade to Spring Framework 6.0.11 and Spring Boot 3.1.1 2023-07-17 16:57:19 +02:00
Brian Clozel
e68e7fe455 Upgrade Docker version in CI pipeline 2023-07-17 16:20:17 +02:00
Brian Clozel
4d89955eaa Upgrade OS in CI docker image 2023-07-17 16:19:56 +02:00
Brian Clozel
f624f06f93 Upgrade to Kotlin 1.8.22 2023-07-17 16:19:32 +02:00
Brian Clozel
9983b1f111 Make report format tests more reliable
This commit ensures that report format tests don't break when the
ordering of reported missing fields change.
2023-07-17 16:18:38 +02:00
Brian Clozel
435ef4a938 Upgrade to Gradle 8.2.1 2023-07-17 16:18:23 +02:00
Brian Clozel
ecadeab19a Upgdate JDK version in CI pipeline 2023-07-17 16:17:41 +02:00
reillylm
0a2caacf9d fix typo in Reference Docs (Request Execution)
Looks like AsciiDoc syntax needs double backticks for plural words like this
2023-07-17 09:03:28 +01:00
rstoyanchev
7ae8c441f9 Update docs on client side cancellation of subscription
Closes gh-724
2023-07-03 11:11:58 +01:00
rstoyanchev
d5d9573ef3 Polishing contribution
Closes gh-734
2023-07-03 06:06:28 +01:00
Gerrit Meier
f4c5003376 Add tests for Neo4j
Also mention Neo4j as compatible with the reactive stack
and the QuerydslPredicateExecutor.

See gh-734
2023-07-03 06:05:48 +01:00
rstoyanchev
e9f68948ec Polishing contribution
Closes gh-737
2023-07-03 05:49:52 +01:00
Babur
ebb3ac69fa Support bean validation with ArgumentValue wrapper
See gh-737
2023-07-03 05:18:00 +01:00
rstoyanchev
5be2d8c01b Polishing contribution
Closes gh-742
2023-07-03 08:51:13 +01:00
Koen Punt
e742404841 Correctly retrieve operation from request body
See gh-742
2023-06-27 15:13:27 +02:00