Commit Graph

35346 Commits (3ef03cddb933044f8c1c50f7c917d9e1f4f96ea3)
 

Author SHA1 Message Date
Stephane Nicoll ed5ea950a4 Merge branch '2.5.x' into 2.6.x 3 years ago
Stephane Nicoll b1ab3b8898 Revert "Upgrade to Spring Kafka 2.7.10"
See gh-29114
3 years ago
Stephane Nicoll 00a274e46d Merge branch '2.7.x' 3 years ago
Stephane Nicoll e48aa9c580 Merge branch '2.6.x' into 2.7.x 3 years ago
Stephane Nicoll 55a20e8a16 Merge branch '2.5.x' into 2.6.x 3 years ago
Stephane Nicoll 669710efe0 Upgrade to Spring Security 5.6.1
Closes gh-28973
3 years ago
Stephane Nicoll af77ee007a Upgrade to Spring Kafka 2.8.1
Closes gh-29017
3 years ago
Stephane Nicoll 66c43685f5 Upgrade to Spring AMQP 2.4.1
Closes gh-28995
3 years ago
Brian Clozel f61c87c3a7 Revert "Merge branch '2.7.x'"
This reverts commit f0677a119c, reversing
changes made to 938d58f32c.
3 years ago
Stephane Nicoll 44a9145bf8 Upgrade to Spring Security 5.5.4
Closes gh-28964
3 years ago
Brian Clozel f0677a119c Merge branch '2.7.x' 3 years ago
Stephane Nicoll 6f8e1166c6 Upgrade to Spring Kafka 2.7.10
Closes gh-29114
3 years ago
Stephane Nicoll b2c2e6d0ca Upgrade to Spring AMQP 2.3.13
Closes gh-28994
3 years ago
Brian Clozel 22706057f0 Document Spring GraphQL support
This commit documents all the features added in the previous commits:
from the main infrastructure support, to testing and metrics.

See gh-29140
3 years ago
Brian Clozel c522a8007b Add smoke test for Spring GraphQL
See gh-29140
3 years ago
Brian Clozel d5603f2c98 Add GraphQL Spring Boot starter
This new starter brings the following dependencies:

* the base starter
* the JSON starter
* the Spring GraphQL dependency

See gh-29140
3 years ago
Brian Clozel 8e29eac887 Auto-configure GraphQL metrics
This commit auto-configures the metrics infrastructure for Spring
GraphQL.

See gh-29140
3 years ago
Brian Clozel a7839bc9b9 Add Metrics support for Spring GraphQL
This commit adds the required infrastructure for instrumenting the
GraphQL engine and datafetchers in order to collect metrics.

With this infrastructure, we can collect metrics such as:

* "graphql.request", a timer for GraphQL query
* "graphql.datafetcher", a timer for GraphQL datafetcher calls
* "graphql.request.datafetch.count", a distribution summary of
  datafetcher count per query
* "graphql.error", an error counter

See gh-29140
3 years ago
Brian Clozel a34308e5f7 Add GraphQlTest slice
This commit adds the `@GraphQlTest` annotation which brings a new type
of sliced test for GraphQL applications. This considers all the required
infrastructure brought by `@AutoConfigureGraphQl`, but also brings
application components like `@Controller` beans and
`RuntimeWiringConfigurer`.

With this type of test, we'll only initialize a minimal setup for
testing a set of Controllers, without involving any transport-related
component.

See gh-29140
3 years ago
Brian Clozel c0707e4f5b Auto-configure GraphQlTester
This commit adds the required infrastructure to auto-configure a
`GraphQlTester` or `WebGraphQlTester` in Spring Boot tests.
Specific annotations like `AutoConfigureGraphQlTester` and
`AutoConfigureWebGraphQlTester` will contribute pre-configured beans for
testing a GraphQL with the tester.

This also ships a `ContextCustomize` for contributing a `GraphQlTester`
in the case of a full `@SpringBootTest` integration test against a live
server.

See gh-29140
3 years ago
Brian Clozel 9a92a9c91d Add AutoConfigureGraphQl test annotation
This commit adds the `@AutoConfigureGraphQl` test annotation. It can be
used to import the relevant auto-configurations when testing a GraphQL
application.
Currently, it will get the main `GraphQlAutoConfiguration`, but also
what's required for configuring codecs and validation support.

See gh-29140
3 years ago
Brian Clozel 6dbcd0e95e Auto-configure security for Spring GraphQL
This commit configures security features for Spring GraphQL.
In the case of both MVC and WebFlux, this contributes
`DataFetcherExceptionResolver` instances to resolve security exceptions
and expose them as proper errors in the GraphQL response.

For MVC only, this also configures a
`SecurityContextThreadLocalAccessor`. This component ensures that the
security context is propagated between `ThreadLocal` and the Reactor
asynchronous execution.

See gh-29140
3 years ago
Brian Clozel 9954b4c63e Auto-configure Query* support for GraphQL
This commit auto-configures Spring Data Querydsl and QueryByExample
support for Spring GraphQL.

See gh-29140
3 years ago
Brian Clozel ce6747ccd6 Enable GraphiQL UI by default with Devtools
GraphiQL is useful when working on a GraphQL API - it allows
developers to craft queries and test newly developed feature. This
is not enabled by default, as this should not be exposed in production
without the developer's knowledge.

This commit flips this value when Spring Boot devtools is active for a
better developer experience.

See gh-29140
3 years ago
Brian Clozel 6ef1ed0dd0 Auto-configure GraphQL WebSocket endpoint
This commit auto-configures a GraphQL WebSocket endpoint for both Spring
MVC and Spring WebFlux. This is only enabled if the required libraries
are on the classpath and if the `"spring.graphql.websocket.path"`
property is defined.

See gh-29140
3 years ago
Brian Clozel 4ef9b9e3e5 Auto-configure CORS options for GraphQL web endpoints
This commit adds `"spring.graphql.cors.*"` configuration properties to
customize the CORS configuration for GraphQL web endpoints.

See gh-29140
3 years ago
Brian Clozel 0099460155 Auto-configure graphiql endpoint
Spring GraphQL ships with a static version of the graphiql IDE for
exploring and querying GraphQL endpoints.
See https://github.com/graphql/graphiql for more information.

This commit auto-configures the GraphiQL handler for both MVC and
WebFlux and points GraphiQL to the GraphQL HTTP endpoint exposed by the
application. This feature is disabled by default and can be switched on
with "spring.graphql.graphiql.enabled=true".

See gh-29140
3 years ago
Brian Clozel ff9a421786 Auto-configure schema printer endpoint
This commit configuresa new endpoint for printing in text format the
resolved GraphQL schema.
This endpoint is exposed by default under "/graphql/schema" and must be
enabled with "spring.graphql.schema.printer=true".

See gh-29140
3 years ago
Brian Clozel b38d04556e Auto-configure HTTP transport for MVC and WebFlux
This commit adds two new auto-configuration classes for Spring GraphQL
support. Once the base GraphQL infrastructure is in place, we can now
expose the `GraphQlService` over an HTTP transport.

Spring GraphQL supports both MVC and WebFlux, so this commit ships with
one auto-configuration for each.
Developers can configure the HTTP path where the GraphQL resource is
exposed using the `spring.graphql.path` configuration property (this
defaults to `"/graphql"`).

See gh-29140
3 years ago
Brian Clozel 5cf0a4db94 Add FailureAnalyzer for InvalidSchemaLocationsException
This commit adds a new `FailureAnalyzer` for exceptions thrown when no
GraphQL schema file could be found.
This lists configured locations (with `"classpath:..."` notation) and
also resolved locations - this helps developers figure out how the
pattern are resolved and why schema files cannot be found.

See gh-29140
3 years ago
Brian Clozel de808834f5 Auto-configure Spring GraphQL base infrastructure
This commit adds the auto-configuration for setting up the base Spring
GraphQL infrastructure. Because GraphQL doesn't depend on any particular
transport, we must have a separate configuration for creating:

* the `GraphQlSource`, which holds the schema and the `GraphQL` instance
* the `GraphQlService` for executing incoming requests
* the `BatchLoaderRegistry` for batch loading support
* the `AnnotatedControllerConfigurer` for supporting the annotated
  controllers programming model

This comes with a starting point for the `"spring.graphql.*"`
configuration properties; we can now configure the locations and file
extensions of GraphQL schema files we should load and configure at
startup.

See gh-29140
3 years ago
Brian Clozel e5e157528b Add dependency management for Spring GraphQL
This commit adds dependency management in Spring Boot for Spring GraphQL
and GraphQL Java.

See gh-29140
3 years ago
Scott Frederick 938d58f32c Merge branch '2.7.x' 3 years ago
Scott Frederick 29ad84714a Merge branch '2.6.x' into 2.7.x
Closes gh-29144
3 years ago
Scott Frederick b3a304fbe7 Merge branch '2.5.x' into 2.6.x
Closes gh-29143
3 years ago
Scott Frederick e4b0575a12 Do not consider bridge methods when binding java bean properties
Fixes gh-28917
3 years ago
Madhura Bhave 6548415fbd Merge branch '2.7.x' into main 3 years ago
Madhura Bhave f4e28be453 Merge branch '2.6.x' into 2.7.x
Closes gh-29142
3 years ago
Madhura Bhave 6c6df5b9e8 Merge branch '2.5.x' into 2.6.x
Closes gh-29141
3 years ago
Madhura Bhave 34f96514ad Fix link to source code in snapshot documentation
Fixes gh-28856
3 years ago
Madhura Bhave 9f47c4a7e0 Merge branch '2.7.x' into main 3 years ago
Madhura Bhave ad45e76b1b Merge branch '2.6.x' into 2.7.x
Closes gh-29139
3 years ago
Madhura Bhave 84f1a6ca09 Merge branch '2.5.x' into 2.6.x
Closes gh-29138
3 years ago
Madhura Bhave 99e650bd27 Document devtools remote support not available with WebFlux
Closes gh-28955
3 years ago
Stephane Nicoll d271e76b48 Merge branch '2.7.x' 3 years ago
Stephane Nicoll 83d732823d Merge branch '2.6.x' into 2.7.x
Closes gh-29136
3 years ago
Stephane Nicoll 653fdbd0a4 Configure comment prefixes
Closes gh-29095
3 years ago
Stephane Nicoll 409f4fdbd7 Merge branch '2.7.x' 3 years ago
Stephane Nicoll dea15a1103 Merge branch '2.6.x' into 2.7.x
Closes gh-29134
3 years ago
Stephane Nicoll 53654a0160 Merge branch '2.5.x' into 2.6.x
Closes gh-29133
3 years ago