You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-graphql.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,12 +52,12 @@ If you wish to not expose information about the schema, you can disable introspe
52
52
53
53
[[web.graphql.runtimewiring]]
54
54
=== GraphQL RuntimeWiring
55
-
The GraphQL Java `RuntimeWiring.Builder` can be used to register custom scalar types, directives, type resolvers, `DataFetcher`s, and more.
55
+
The GraphQL Java `RuntimeWiring.Builder` can be used to register custom scalar types, directives, type resolvers, ``DataFetcher``s, and more.
56
56
You can declare `RuntimeWiringConfigurer` beans in your Spring config to get access to the `RuntimeWiring.Builder`.
57
57
Spring Boot detects such beans and adds them to the {spring-graphql-docs}#execution-graphqlsource[GraphQlSource builder].
58
58
59
59
Typically, however, applications will not implement `DataFetcher` directly and will instead create {spring-graphql-docs}#controllers[annotated controllers].
60
-
Spring Boot will automatically detect `@Controller` classes with annotated handler methods and register those as `DataFetcher`s.
60
+
Spring Boot will automatically detect `@Controller` classes with annotated handler methods and register those as ``DataFetcher``s.
61
61
Here's a sample implementation for our greeting query with a `@Controller` class:
62
62
63
63
include::code:GreetingController[]
@@ -86,7 +86,7 @@ are detected by Spring Boot and considered as candidates for `DataFetcher` for m
86
86
87
87
[[web.graphql.transports.http-websocket]]
88
88
==== HTTP and WebSocket
89
-
The GraphQL HTTP endpoint is at HTTP POST "/graphql" by default.
89
+
The GraphQL HTTP endpoint is at HTTP POST `/graphql` by default.
90
90
The path can be customized with configprop:spring.graphql.path[].
91
91
92
92
TIP: The HTTP endpoint for both Spring MVC and Spring WebFlux is provided by a `RouterFunction` bean with an `@Order` of `0`.
Spring GraphQL enables applications to register one or more Spring `DataFetcherExceptionResolver` components that are invoked sequentially.
141
141
The Exception must be resolved to a list of `graphql.GraphQLError` objects, see {spring-graphql-docs}#execution-exceptions[Spring GraphQL exception handling documentation].
142
142
Spring Boot will automatically detect `DataFetcherExceptionResolver` beans and register them with the `GraphQlSource.Builder`.
0 commit comments