@@ -20,7 +20,8 @@ feedback. Please, use our
20
20
https://github.com/spring-projects/spring-graphql/issues[issue tracker] to report a
21
21
problem, discuss a design issue, or request a feature.
22
22
23
- To get started, please see the <<boot-graphql>> and the <<samples>> sections.
23
+ To get started, check the Spring GraphQL starter on https://start.spring.io and the
24
+ <<samples>> sections.
24
25
25
26
[[requirements]]
26
27
== Requirements
@@ -59,8 +60,10 @@ status is always 200 (OK), and any errors from GraphQL request execution appear
59
60
60
61
`GraphQlHttpHandler` can be exposed as an HTTP endpoint by declaring a `RouterFunction`
61
62
bean and using the `RouterFunctions` from Spring MVC or WebFlux to create the route. The
62
- Boot starter does this, see <<boot-graphql-web>> for details or check
63
- `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration` for example config.
63
+ Boot starter does this, see the
64
+ {spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section for
65
+ details, or check `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration`
66
+ it contains, for the actual config.
64
67
65
68
The Spring for GraphQL repository contains a Spring MVC
66
69
{github-main-branch}/samples/webmvc-http[HTTP sample] application.
@@ -100,8 +103,10 @@ https://github.com/enisdenjo/graphql-ws#recipes[recipes] for client use.
100
103
101
104
`GraphQlWebSocketHandler` can be exposed as a WebSocket endpoint by declaring a
102
105
`SimpleUrlHandlerMapping` bean and using it to map the handler to a URL path. The Boot
103
- starter has options to enable this, see <<boot-graphql-web>> for details or check
104
- `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration` for example config.
106
+ starter has options to enable this, see the
107
+ {spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section for
108
+ details, or check `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration`
109
+ it contains, for the actual config.
105
110
106
111
The Spring for GraphQL repository contains a WebFlux
107
112
{github-main-branch}/samples/webflux-websocket[WebSocket sample] application.
@@ -156,11 +161,10 @@ class MyInterceptor implements WebInterceptor {
156
161
157
162
`WebGraphQlHandler` provides a builder to initialize the Web interception chain. After
158
163
you build the chain, you can use the resulting `WebGraphQlHandler` to initialize the HTTP
159
- or WebSocket transport handlers. The Boot starter configures all this,
160
- see <<boot-graphql-web>> for details, or check `GraphQlWebMvcAutoConfiguration` or
161
- `GraphQlWebFluxAutoConfiguration` for example config.
162
-
163
-
164
+ or WebSocket transport handlers. The Boot starter configures all this, see the
165
+ {spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section for
166
+ details, or check `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration`
167
+ it contains, for the actual config.
164
168
165
169
166
170
[[execution]]
@@ -193,10 +197,11 @@ support for <<execution-reactive-datafetcher>>, <<execution-context>>, and
193
197
194
198
`GraphQlSource.Builder` can be configured with one or more `Resource` instances to be
195
199
parsed and merged together. That means schema files can be loaded from just about any
196
- location. By default, the Spring Boot starter <<boot-graphql-schema,loads schema files>>
197
- from a well-known classpath location, but you can change that to a location on the file system
198
- via `FileSystemResource`, to byte content via `ByteArrayResource`, or implement a custom
199
- `Resource` that loads schema files from a remote location or storage.
200
+ location. By default, the Spring Boot starter
201
+ {spring-boot-ref-docs}/web.html#web.graphql.schema[loads schema files]
202
+ from a well-known classpath location, but you can change that to a location on the file
203
+ system via `FileSystemResource`, to byte content via `ByteArrayResource`, or implement a
204
+ custom `Resource` that loads schema files from a remote location or storage.
200
205
201
206
202
207
[[execution-graphqlsource-schema-creation]]
@@ -323,7 +328,8 @@ public class RequestAttributesAccessor implements ThreadLocalAccessor {
323
328
324
329
A `ThreadLocalAccessor` can be registered in the <<web-interception,WebGraphHandler>>
325
330
builder. The Boot starter detects beans of this type and automatically registers them for
326
- Spring MVC application, see <<boot-graphql-web>>.
331
+ Spring MVC application, see the
332
+ {spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section.
327
333
328
334
329
335
[[execution-context-webflux]]
@@ -418,8 +424,7 @@ public class MyConfig {
418
424
}
419
425
----
420
426
421
- The Spring Boot starter declares a
422
- <<boot-graphql-batch-loader-registry,BatchLoaderRegistry bean>> so you can inject it into
427
+ The Spring Boot starter declares a `BatchLoaderRegistry` bean that you can inject into
423
428
your configuration, as shown above, or into any component such as a controller in order
424
429
register batch loading functions. In turn the `BatchLoaderRegistry` is injected into
425
430
`ExecutionGraphQlService` where it ensures `DataLoader` registrations per request.
@@ -619,8 +624,10 @@ Auto-registration detects if a given repository implements `QuerydslBinderCustom
619
624
transparently applies that through `QuerydslDataFetcher` builder methods.
620
625
621
626
Auto-registration is performed through a `RuntimeWiringConfigurer` which can be obtained
622
- from `QuerydslDataFetcher`. The <<boot-repositories-querydsl,Boot starter>> automatically
623
- detects `@GraphQlRepository` beans and uses them to configure the `RuntimeWiringConfigurer`.
627
+ from `QuerydslDataFetcher`. The
628
+ {spring-boot-ref-docs}/web.html#web.graphql.data-query[Boot starter] automatically
629
+ detects `@GraphQlRepository` beans and uses them to initialize the
630
+ `RuntimeWiringConfigurer` with.
624
631
625
632
626
633
@@ -692,8 +699,10 @@ of the repository domain type. If needed, you can use the `typeName` attribute o
692
699
`@GraphQlRepository` to specify the target GraphQL type name.
693
700
694
701
Auto-registration is performed through a `RuntimeWiringConfigurer` which can be obtained from
695
- `QueryByExampleDataFetcher`. The <<boot-repositories-querybyexample,Boot starter>> automatically
696
- detects `@GraphQlRepository` beans and uses them to configure the `RuntimeWiringConfigurer`.
702
+ `QueryByExampleDataFetcher`. The
703
+ {spring-boot-ref-docs}/web.html#web.graphql.data-query[Boot starter] automatically
704
+ detects `@GraphQlRepository` beans and uses them to initialize the
705
+ `RuntimeWiringConfigurer` with.
697
706
698
707
699
708
@@ -738,7 +747,9 @@ annotated handler methods as ``DataFetcher``s via `RuntimeWiring.Builder`. It is
738
747
implementation of `RuntimeWiringConfigurer` which can be added to `GraphQlSource.Builder`.
739
748
The Spring Boot starter automatically declares `AnnotatedControllerConfigurer` as a bean
740
749
and adds all `RuntimeWiringConfigurer` beans to `GraphQlSource.Builder` and that enables
741
- support for annotated ``DataFetcher``s, see <<boot-graphql-runtimewiring>>.
750
+ support for annotated ``DataFetcher``s, see the
751
+ {spring-boot-ref-docs}/web.html#web.graphql.runtimewiring[GraphQL RuntimeWiring] section
752
+ in the Boot starter documentation.
742
753
743
754
744
755
[[controllers-schema-mapping]]
0 commit comments