diff --git a/spring-graphql-docs/modules/ROOT/pages/client.adoc b/spring-graphql-docs/modules/ROOT/pages/client.adoc index a075b4b3..23ad772c 100644 --- a/spring-graphql-docs/modules/ROOT/pages/client.adoc +++ b/spring-graphql-docs/modules/ROOT/pages/client.adoc @@ -165,14 +165,20 @@ existing `WebSocketGraphQlClient` to create a new instance with customized setti ---- -If you'd like the client to send regular graphql ping messages to the server, you can add these by adding `keepalive(long seconds)` to the builder +`WebSocketGraphQlClient` supports sending periodic ping messages to keep the connection +active when no other messages are sent or received. You can enable that as follows: + [source,java,indent=0,subs="verbatim,quotes"] ---- - WebSocketGraphQlClient graphQlClient = WebSocketGraphQlClient.builder(url, client) - .keepalive(30) - .build(); + URI url = ... ; + WebSocketClient client = ... ; + + WebSocketGraphQlClient graphQlClient = WebSocketGraphQlClient.builder(url, client) + .keepAlive(Duration.ofSeconds(30)) + .build(); ---- + [[client.websocketgraphqlclient.interceptor]] ==== Interceptor