Fix broken Spring GraphQL links

Closes gh-42207
This commit is contained in:
Stéphane Nicoll
2024-09-11 11:05:37 +02:00
parent bee3158d91
commit 915cb12c64
2 changed files with 7 additions and 7 deletions

View File

@@ -484,14 +484,14 @@ Spring GraphQL offers a dedicated testing support module; you'll need to add it
}
----
This testing module ships the {spring-graphql-docs}/#testing-graphqltester[GraphQlTester].
This testing module ships the {spring-graphql-docs}/testing.html#testing.graphqltester[GraphQlTester].
The tester is heavily used in test, so be sure to become familiar with using it.
There are `GraphQlTester` variants and Spring Boot will auto-configure them depending on the type of tests:
* the `ExecutionGraphQlServiceTester` performs tests on the server side, without a client nor a transport
* the `HttpGraphQlTester` performs tests with a client that connects to a server, with or without a live server
Spring Boot helps you to test your {spring-graphql-docs}/#controllers[Spring GraphQL Controllers] with the `@GraphQlTest` annotation.
Spring Boot helps you to test your {spring-graphql-docs}/controllers.html[Spring GraphQL Controllers] with the `@GraphQlTest` annotation.
`@GraphQlTest` auto-configures the Spring GraphQL infrastructure, without any transport nor server being involved.
This limits scanned beans to `@Controller`, `RuntimeWiringConfigurer`, `JsonComponent`, `Converter`, `GenericConverter`, `DataFetcherExceptionResolver`, `Instrumentation` and `GraphQlSourceBuilderCustomizer`.
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@GraphQlTest` annotation is used.

View File

@@ -54,9 +54,9 @@ If you wish to not expose information about the schema, you can disable introspe
=== GraphQL RuntimeWiring
The GraphQL Java `RuntimeWiring.Builder` can be used to register custom scalar types, directives, type resolvers, `DataFetcher`, and more.
You can declare `RuntimeWiringConfigurer` beans in your Spring config to get access to the `RuntimeWiring.Builder`.
Spring Boot detects such beans and adds them to the {spring-graphql-docs}/#execution-graphqlsource[GraphQlSource builder].
Spring Boot detects such beans and adds them to the {spring-graphql-docs}/request-execution.html#execution.graphqlsource[GraphQlSource builder].
Typically, however, applications will not implement `DataFetcher` directly and will instead create {spring-graphql-docs}/#controllers[annotated controllers].
Typically, however, applications will not implement `DataFetcher` directly and will instead create {spring-graphql-docs}/controllers.html[annotated controllers].
Spring Boot will automatically detect `@Controller` classes with annotated handler methods and register those as ``DataFetcher``s.
Here's a sample implementation for our greeting query with a `@Controller` class:
@@ -67,7 +67,7 @@ include::code:GreetingController[]
[[web.graphql.data-query]]
=== Querydsl and QueryByExample Repositories Support
Spring Data offers support for both Querydsl and QueryByExample repositories.
Spring GraphQL can {spring-graphql-docs}/#data[configure Querydsl and QueryByExample repositories as `DataFetcher`].
Spring GraphQL can {spring-graphql-docs}/data.html[configure Querydsl and QueryByExample repositories as `DataFetcher`].
Spring Data repositories annotated with `@GraphQlRepository` and extending one of:
@@ -98,7 +98,7 @@ The GraphQL WebSocket endpoint is off by default. To enable it:
* For a WebFlux application, no additional dependency is required
* For both, the configprop:spring.graphql.websocket.path[] application property must be set
Spring GraphQL provides a {spring-graphql-docs}/#web-interception[Web Interception] model.
Spring GraphQL provides a {spring-graphql-docs}/transports.html#server.interception[Web Interception] model.
This is quite useful for retrieving information from an HTTP request header and set it in the GraphQL context or fetching information from the same context and writing it to a response header.
With Spring Boot, you can declare a `WebInterceptor` bean to have it registered with the web transport.
@@ -138,7 +138,7 @@ include::code:RSocketGraphQlClientExample[tag=request]
[[web.graphql.exception-handling]]
=== Exception Handling
Spring GraphQL enables applications to register one or more Spring `DataFetcherExceptionResolver` components that are invoked sequentially.
The Exception must be resolved to a list of `graphql.GraphQLError` objects, see {spring-graphql-docs}/#execution-exceptions[Spring GraphQL exception handling documentation].
The Exception must be resolved to a list of `graphql.GraphQLError` objects, see {spring-graphql-docs}/controllers.html#controllers.exception-handler[Spring GraphQL exception handling documentation].
Spring Boot will automatically detect `DataFetcherExceptionResolver` beans and register them with the `GraphQlSource.Builder`.