Class GraphQlWebSocketHandler

java.lang.Object
org.springframework.graphql.server.webflux.GraphQlWebSocketHandler
All Implemented Interfaces:
WebSocketHandler

@RegisterReflectionForBinding(GraphQlWebSocketMessage.class) public class GraphQlWebSocketHandler extends Object implements WebSocketHandler
WebSocketHandler for GraphQL based on GraphQL Over WebSocket Protocol and for use in a Spring WebFlux application.
Since:
1.0.0
Author:
Rossen Stoyanchev
  • Constructor Details

    • GraphQlWebSocketHandler

      public GraphQlWebSocketHandler(WebGraphQlHandler graphQlHandler, CodecConfigurer codecConfigurer, Duration connectionInitTimeout)
      Create a new instance.
      Parameters:
      graphQlHandler - common handler for GraphQL over WebSocket requests
      codecConfigurer - codec configurer for JSON encoding and decoding
      connectionInitTimeout - how long to wait after the establishment of the WebSocket for the "connection_ini" message from the client.
    • GraphQlWebSocketHandler

      public GraphQlWebSocketHandler(WebGraphQlHandler graphQlHandler, CodecConfigurer codecConfigurer, Duration connectionInitTimeout, @Nullable Duration keepAliveDuration)
      Create a new instance.
      Parameters:
      graphQlHandler - common handler for GraphQL over WebSocket requests
      codecConfigurer - codec configurer for JSON encoding and decoding
      connectionInitTimeout - how long to wait after the establishment of the WebSocket for the "connection_ini" message from the client.
      keepAliveDuration - how frequently to send ping messages; if not set then ping messages are not sent.
      Since:
      1.3
  • Method Details