Skip to content

Commit

Permalink
Update reference doc links to Spring Boot 3.3.x
Browse files Browse the repository at this point in the history
Closes gh-1016
  • Loading branch information
bclozel committed Jun 20, 2024
1 parent 096dcd3 commit 6e155c0
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ext {
moduleProjects = [project(":spring-graphql"), project(":spring-graphql-test")]
springFrameworkVersion = "6.1.9"
graphQlJavaVersion = "22.1"
springBootVersion = "3.2.2"
springBootVersion = "3.3.0"
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion spring-graphql-docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ asciidoc:
javadoc: https://docs.spring.io/spring-graphql/docs/{spring-graphql-version}/api
# version attributes from main build.gradle
spring-framework-ref-docs: https://docs.spring.io/spring-framework/reference
spring-boot-ref-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/html
spring-boot-ref-docs: https://docs.spring.io/spring-boot/{spring-boot-version}
examples-repo: https://github.com/spring-projects/spring-graphql-examples
10 changes: 5 additions & 5 deletions spring-graphql-docs/modules/ROOT/pages/boot-starter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ https://github.com/spring-projects/spring-graphql/wiki/Spring-for-GraphQL-Versio
The easiest way to get started is via https://start.spring.io by selecting
"Spring for GraphQL" along with an underlying transport such as Spring MVC of WebFlux over
HTTP or WebSocket, or over RSocket. Refer to the
https://docs.spring.io/spring-boot/docs/current/reference/html/web.html#web.graphql[Spring for GraphQL Starter]
{spring-boot-ref-docs}/reference/web/spring-graphql.html[Spring for GraphQL Starter]
section in the Spring Boot reference for details on supported transports, auto-configuration related
features, and more. For testing support, see
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.testing.spring-boot-applications.spring-graphql-tests[Auto-Configured GraphQL Tests].
{spring-boot-ref-docs}/reference/testing/spring-boot-applications.html#testing.spring-boot-applications.spring-graphql-tests[Auto-Configured GraphQL Tests].

For further reference, check the following GraphQL related:

- https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.metrics.supported.spring-graphql[Metrics]
- https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties.web[Properties]
- https://docs.spring.io/spring-boot/docs/current/reference/html/auto-configuration-classes.html#appendix.auto-configuration-classes.core[Auto-Configuration Classes]
- {spring-boot-ref-docs}/appendix/application-properties/index.html#appendix.application-properties.web[Configuration Properties]
- {spring-boot-ref-docs}/appendix/auto-configuration-classes/core.html[GraphQL Auto-Configuration Classes]
- {spring-boot-ref-docs}/appendix/auto-configuration-classes/actuator.html[GraphQL Actuator Auto-Configuration Classes]

2 changes: 1 addition & 1 deletion spring-graphql-docs/modules/ROOT/pages/controllers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ implementation of `RuntimeWiringConfigurer` which can be added to `GraphQlSource
The xref:boot-starter.adoc[Boot Starter] automatically declares `AnnotatedControllerConfigurer` as a bean
and adds all `RuntimeWiringConfigurer` beans to `GraphQlSource.Builder` and that enables
support for annotated ``DataFetcher``s, see the
{spring-boot-ref-docs}/web.html#web.graphql.runtimewiring[GraphQL RuntimeWiring] section
{spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.runtimewiring[GraphQL RuntimeWiring] section
in the Boot starter documentation.


Expand Down
4 changes: 2 additions & 2 deletions spring-graphql-docs/modules/ROOT/pages/graalvm-native.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

Spring Framework 6.0 introduced the support infrastructure for compiling Spring applications to https://www.graalvm.org/22.3/reference-manual/native-image/[GraalVM Native images].
If you are not familiar with GraalVM in general, how this differs from applications deployed on the JVM and what it means for Spring application,
please refer to the dedicated {spring-boot-ref-docs}/native-image.html#native-image[Spring Boot 3.0 GraalVM Native Image support documentation].
please refer to the dedicated {spring-boot-ref-docs}/reference/native-image/introducing-graalvm-native-images.html[Spring Boot 3.x GraalVM Native Image support documentation].
Spring Boot also documents the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-with-GraalVM[know limitations with the GraalVM support in Spring].


[[graalvm.graphql-java]]
== GraphQL Java metadata

Since the {spring-boot-ref-docs}/native-image.html#native-image.introducing-graalvm-native-images.key-differences-with-jvm-deployments[static analysis of your application is done at build time],
Since the {spring-boot-ref-docs}/reference/native-image/introducing-graalvm-native-images.html#native-image.introducing-graalvm-native-images.key-differences-with-jvm-deployments[static analysis of your application is done at build time],
GraalVM might need extra hints if your application is looking up static resources, performing reflection or creating JDK proxies at runtime.

GraphQL Java is performing three tasks at runtime that Native Images are sensible to:
Expand Down
4 changes: 2 additions & 2 deletions spring-graphql-docs/modules/ROOT/pages/graphiql.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ During development, a stock GraphiQL integration is often enough to help develop
In production, applications can require a custom GraphiQL build, that ships with a company logo or specific authentication support.

Spring for GraphQL ships with https://github.com/spring-projects/spring-graphql/blob/main/spring-graphql/src/main/resources/graphiql/index.html[a stock GraphiQL `index.html` page] that uses static resources hosted on the unpkg.com CDN.
Spring Boot applications can easily {spring-boot-ref-docs}/web.html#web.graphql.graphiql[enable this page with a configuration property].
Spring Boot applications can easily {spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.graphiql[enable this page with a configuration property].

Your application may need a custom GraphiQL build if it requires a setup that doesn't rely on a CDN, or if you wish to customize the user interface.
This can be done in two steps:
Expand Down Expand Up @@ -35,4 +35,4 @@ include-code::GraphiQlConfiguration[]
<3> Finally, map the handler to a specific HTTP endpoint
<4> Expose this new route through a `RouterFunction` bean

You might also need to configure your application to {spring-boot-ref-docs}/web.html#web.servlet.spring-mvc.static-content[serve the relevant static resources].
You might also need to configure your application to {spring-boot-ref-docs}/reference/web/servlet.html#web.servlet.spring-mvc.static-content[serve the relevant static resources].
4 changes: 2 additions & 2 deletions spring-graphql-docs/modules/ROOT/pages/observability.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[[observability]]
= Observability

https://micrometer.io/docs/observation[Observability support with Micrometer] is directly instrumented in Spring for GraphQL.
https://docs.micrometer.io/micrometer/reference/observation.html[Observability support with Micrometer] is directly instrumented in Spring for GraphQL.
This enables both metrics and traces for GraphQL requests and "non-trivial" data fetching operations.
Because the GraphQL engine operates on top of a transport layer, you should also {spring-framework-ref-docs}/integration/observability.html[expect observations from the transport], if supported in Spring Framework.

Observations are only published if an `ObservationRegistry` is configured in the application.
You can learn more about {spring-boot-ref-docs}/actuator.html#actuator.metrics[configuring the observability infrastructure in Spring Boot].
You can learn more about {spring-boot-ref-docs}/reference/actuator/metrics.html[configuring the observability infrastructure in Spring Boot].
If you would like to customize the metadata produced with the GraphQL observations, you can {spring-framework-ref-docs}/integration/observability.html#observability.config.conventions[configure a custom convention on the instrumentation directly].
If your application is using Spring Boot, contributing the custom convention as a bean is the preferred way.

Expand Down
6 changes: 3 additions & 3 deletions spring-graphql-docs/modules/ROOT/pages/request-execution.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ includes a builder API to build that instance. The default builder is available

The xref:boot-starter.adoc[Boot Starter] creates an instance of this builder and further initializes it
to xref:request-execution.adoc#execution.graphqlsource.schema-resources[load schema files] from a configurable location,
to {spring-boot-ref-docs}/application-properties.html#appendix.application-properties.web[expose properties]
to {spring-boot-ref-docs}/appendix/application-properties/index.html#appendix.application-properties.web[expose properties]
to apply to `GraphQlSource.Builder`, to detect
xref:request-execution.adoc#execution.graphqlsource.runtimewiring-configurer[`RuntimeWiringConfigurer`] beans,
https://www.graphql-java.com/documentation/instrumentation[Instrumentation] beans for
{spring-boot-ref-docs}/actuator.html#actuator.metrics.supported.spring-graphql[GraphQL metrics],
xref:observability.adoc#observability[GraphQL metrics],
and `DataFetcherExceptionResolver` and `SubscriptionExceptionResolver` beans for
xref:request-execution.adoc#execution.exceptions[exception resolution]. For further customizations, you can also
declare a `GraphQlSourceBuilderCustomizer` bean, for example:
Expand Down Expand Up @@ -52,7 +52,7 @@ parsed and merged together. That means schema files can be loaded from just abou
location.

By default, the Boot starter
{spring-boot-ref-docs}/web.html#web.graphql.schema[looks for schema files] with extensions
{spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.schema[looks for schema files] with extensions
".graphqls" or ".gqls" under the location `classpath:graphql/**`, which is typically
`src/main/resources/graphql`. You can also use a file system location, or any location
supported by the Spring `Resource` hierarchy, including a custom implementation that
Expand Down
10 changes: 5 additions & 5 deletions spring-graphql-docs/modules/ROOT/pages/transports.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ is also supported, as described in the specification.
`GraphQlHttpHandler` can be exposed as an HTTP endpoint by declaring a `RouterFunction`
bean and using the `RouterFunctions` from Spring MVC or WebFlux to create the route. The
xref:boot-starter.adoc[Boot Starter] does this, see the
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints] section for
{spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.transports.http-websocket[Web Endpoints] section for
details, or check `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration`
it contains, for the actual config.

Expand Down Expand Up @@ -112,9 +112,9 @@ https://github.com/enisdenjo/graphql-ws#recipes[recipes] for client use.
`SimpleUrlHandlerMapping` bean and using it to map the handler to a URL path. By default,
the xref:boot-starter.adoc[Boot Starter] does not expose a GraphQL over WebSocket endpoint,
but you can add a property for the endpoint path to enable it. Please, review
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints]
{spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.transports.http-websocket[Web Endpoints]
in the Boot reference documentation, and the list of supported `spring.graphql.websocket`
https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties.web[properties].
{spring-boot-ref-docs}/appendix/application-properties/index.html#appendix.application-properties.web[properties].
You can also look at `GraphQlWebMvcAutoConfiguration` or`GraphQlWebFluxAutoConfiguration`
for the actual Boot autoconfig details.

Expand Down Expand Up @@ -182,7 +182,7 @@ include-code::RequestErrorInterceptor[]

Use `WebGraphQlHandler` to configure the `WebGraphQlInterceptor` chain. This is supported
by the xref:boot-starter.adoc[Boot Starter], see
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints].
{spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.transports.http-websocket[Web Endpoints].


[[server.interception.websocket]]
Expand All @@ -195,7 +195,7 @@ WebSocket connection.

Use `WebGraphQlHandler` to configure the `WebGraphQlInterceptor` chain. This is supported
by the xref:boot-starter.adoc[Boot Starter], see
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints].
{spring-boot-ref-docs}/reference/web/spring-graphql.html#web.graphql.transports.http-websocket[Web Endpoints].
There can be at most one `WebSocketGraphQlInterceptor` in a chain of interceptors.

There are two built-in WebSocket interceptors called `AuthenticationWebSocketInterceptor`,
Expand Down

0 comments on commit 6e155c0

Please sign in to comment.