Commit Graph

26 Commits

Author SHA1 Message Date
rstoyanchev
4818ee6c81 Upgrade samples to match the GraphQlTest updates
See gh-310
2022-03-09 12:47:26 +00:00
rstoyanchev
19793a6e74 Revert "Pin version to 1.0.0-M5 in samples"
This reverts commit b40375f1f2.
2022-03-09 08:57:10 +00:00
rstoyanchev
b40375f1f2 Pin version to 1.0.0-M5 in samples
This is necessary until Boot catches up with spring-graphql snapshots.
2022-03-07 10:39:59 +00:00
Brian Clozel
410e7e60ae Revisit Gradle repositories configuration 2022-01-19 14:22:04 +01:00
Brian Clozel
a15fd29fc0 Remove Spring Boot Experimental Starter
The Experimental Spring Boot Starter for Spring GraphQL has been moved
to Spring Boot and will be released with Spring Boot 2.7.0.

Closes gh-207
2021-12-21 14:09:17 +01:00
Rossen Stoyanchev
59d5458333 Update sample tests after test config improvements
See gh-75
2021-10-27 21:53:15 +01:00
Brian Clozel
e053e14158 Add GraphQlTest annotation
Prior to this commit, we could only test Spring GraphQL applications
with a complete application - all application and infrastructure
components were involved. While using `@SpringBootTest` is often useful
for complete integration tests (with or without a live running server),
we often want to write lean integration tests and test slices of our
application.

Just like `@WebMvcTest` or `@WebFluxTest`, this commit introduces the
support for `@GraphQlTest`. This annotation helps us to test a
particular slice of our application: a hand-picked selection of
`@Controller`, plus `RuntimeWiringConfigurer` and `WebInterceptor`
beans.

Other `@Component` must be imported or mocked for those tests.

This commit also refactors the existing auto-configuration to enable
this use case. The `WebGraphQlHandlerAutoConfiguration` now holds the
required components for `@GraphQlTest`, while other web-related
auto-configurations bring the web framework and transport
infrastructures.

Closes gh-75
2021-10-22 22:00:02 +02:00
Rossen Stoyanchev
20bae75ed8 Add WebSocketInterceptor
See gh-162
2021-10-20 21:21:31 +01:00
Rossen Stoyanchev
21d9791484 Update reference docs for access to HTTP headers
Also rename existing methods for request headers to be consistent with
those for response headers and use "Http" in the name.

Closes gh-74
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
762b9f06c2 Support query files for input in GraphQlTester
Closes gh-67
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
892d2bd344 Use properties for Boot and GraphQL Java versions 2021-09-16 11:15:47 +01:00
Rossen Stoyanchev
1b72e8107d Update Spring Boot version 2.5.0 -> 2.5.4 2021-09-16 10:21:45 +01:00
Rossen Stoyanchev
4bd229d4b9 Deprecate @GraphQlController in favor of @Controller 2021-08-30 14:56:01 +01:00
Rossen Stoyanchev
0d0b84dc8a Support for annotated DataFetcher's
Closes gh-61, gh-90
2021-08-09 12:37:47 +01:00
Rossen Stoyanchev
1ea5e346b9 Fix links in sample README's 2021-07-07 09:02:51 +01:00
Rossen Stoyanchev
72ee49269f Polishing 2021-07-06 16:18:09 +01:00
Brian Clozel
289f4d0bac Simplify security samples
As of gh-81, specific security components are contributed by the
GraphQL Security auto-configuration.

This commit removes those from the custom SecurityConfig classes.
2021-07-06 17:02:38 +02:00
Rossen Stoyanchev
69c2d08c71 Remove formatter-on/off comments 2021-07-06 15:51:50 +01:00
Rossen Stoyanchev
b594c19526 Add security package with basic infrastructure
Closes gh-80, gh-82
2021-07-06 15:38:16 +01:00
Rossen Stoyanchev
aea229778c Add README files to samples 2021-07-06 15:35:23 +01:00
Rossen Stoyanchev
bac7461678 Add DataFetcherExceptionResolverAdapter
The adapter aims to:
- simplify the common case of synchronous resolution to a single error
- support ThreadLocal context propagation on an opt-in basis

This replaces the SyncDataFetcherExceptionResolver and removes the need
to propagate ThreadLocal context to every resolver.
2021-07-05 19:35:04 +01:00
Rossen Stoyanchev
16656d623f Polishing Javadoc and in security sample 2021-07-05 14:36:25 +01:00
Stephane Nicoll
9d4ebfe743 Polish 2021-06-30 15:44:24 +02:00
Rossen Stoyanchev
bbf152a32f Deserialize errorType from extensions
The errorType field on GraphQLError is specific to GraphQL Java and when
serialized via GraphqlErrorHelper#toSpecification it becomes an
extension with the key "classification".

This commit ensures that we correctly deserialize back to errorType from
the "classification" extension but unfortunately that's limited to the
ErrorClassification enums that we know of.
2021-06-29 14:53:50 +01:00
Rob Winch
dfebb6f53d webmvc-http-security uses WebGraphQlTester
Issue gh-58
2021-06-28 15:40:45 -05:00
Rob Winch
7d854dbf47 Add webmvc-http-security
Closes gh-58
2021-06-28 14:17:16 -05:00