Class GraphQlSseHandler

java.lang.Object
org.springframework.graphql.server.webflux.AbstractGraphQlHttpHandler
org.springframework.graphql.server.webflux.GraphQlSseHandler

public class GraphQlSseHandler extends AbstractGraphQlHttpHandler
GraphQL handler that supports the GraphQL Server-Sent Events Protocol and to be exposed as a WebFlux.fn endpoint via RouterFunctions.
Since:
1.3.0
Author:
Brian Clozel, Rossen Stoyanchev
  • Constructor Details

    • GraphQlSseHandler

      public GraphQlSseHandler(WebGraphQlHandler graphQlHandler)
      Basic constructor with the handler to delegate to, and no timeout by default, which results in never timing out.
      Parameters:
      graphQlHandler - the handler to delegate to
    • GraphQlSseHandler

      public GraphQlSseHandler(WebGraphQlHandler graphQlHandler, @Nullable Duration timeout)
      Constructor with a timeout on how long to wait for the application to return the ServerResponse that will start the stream.
      Parameters:
      graphQlHandler - the handler to delegate to
      timeout - the timeout value, or null to never time out
      Since:
      1.3.3
    • GraphQlSseHandler

      public GraphQlSseHandler(WebGraphQlHandler graphQlHandler, @Nullable Duration timeout, @Nullable Duration keepAliveDuration)
      Constructor with a keep-alive duration that determines how frequently to heartbeats during periods of inactivity.
      Parameters:
      graphQlHandler - the handler to delegate to
      timeout - the timeout value to use or null to never time out
      keepAliveDuration - how frequently to send empty comment messages when no other messages are sent
      Since:
      1.4.0
  • Method Details