Skip to content

Commit 2e22dce

Browse files
committed
Fix links and improve docs for exposing WebSocket endpoint
Closes gh-436
1 parent 174b77b commit 2e22dce

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

spring-graphql-docs/src/docs/asciidoc/index.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ specification.
6262
`GraphQlHttpHandler` can be exposed as an HTTP endpoint by declaring a `RouterFunction`
6363
bean and using the `RouterFunctions` from Spring MVC or WebFlux to create the route. The
6464
Boot starter does this, see the
65-
{spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section for
65+
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints] section for
6666
details, or check `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration`
6767
it contains, for the actual config.
6868

@@ -103,11 +103,12 @@ The `graphql-ws` project lists a number of
103103
https://github.com/enisdenjo/graphql-ws#recipes[recipes] for client use.
104104

105105
`GraphQlWebSocketHandler` can be exposed as a WebSocket endpoint by declaring a
106-
`SimpleUrlHandlerMapping` bean and using it to map the handler to a URL path. The Boot
107-
starter has options to enable this, see the
108-
{spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section for
109-
details, or check `GraphQlWebMvcAutoConfiguration` or `GraphQlWebFluxAutoConfiguration`
110-
it contains, for the actual config.
106+
`SimpleUrlHandlerMapping` bean and using it to map the handler to a URL path. By default,
107+
the Boot starter does not expose a GraphQL over WebSocket endpoint, but it's easy to
108+
enable it by adding a property for the endpoint path. Please, see the
109+
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints]
110+
section for details, or check the `GraphQlWebMvcAutoConfiguration` or the
111+
`GraphQlWebFluxAutoConfiguration` for the actual Boot starter config.
111112

112113
The Spring for GraphQL repository contains a WebFlux
113114
{github-main-branch}/samples/webflux-websocket[WebSocket sample] application.
@@ -216,7 +217,7 @@ class HeaderInterceptor implements WebGraphQlInterceptor {
216217

217218
The `WebGraphQlInterceptor` chain can be updated through the `WebGraphQlHandler` builder,
218219
and the Boot starter uses this, see Boot's section on
219-
{spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints].
220+
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints].
220221

221222
The <<server-rsocket>> transport handler delegates to a similar `GraphQlInterceptor`
222223
chain that you can use to intercept GraphQL over RSocket requests.
@@ -517,7 +518,7 @@ public class RequestAttributesAccessor implements ThreadLocalAccessor {
517518
A `ThreadLocalAccessor` can be registered in the <<server-interception,WebGraphHandler>>
518519
builder. The Boot starter detects beans of this type and automatically registers them for
519520
Spring MVC application, see the
520-
{spring-boot-ref-docs}/web.html#web.graphql.web-endpoints[Web Endpoints] section.
521+
{spring-boot-ref-docs}/web.html#web.graphql.transports.http-websocket[Web Endpoints] section.
521522

522523

523524
[[execution-context-webflux]]

0 commit comments

Comments
 (0)