Class GraphQlSseHandler
java.lang.Object
org.springframework.graphql.server.webmvc.AbstractGraphQlHttpHandler
org.springframework.graphql.server.webmvc.GraphQlSseHandler
GraphQL handler that supports the
 GraphQL
 Server-Sent Events Protocol and to be exposed as a WebMvc functional endpoint via
 
RouterFunctions.- Since:
- 1.3.0
- Author:
- Brian Clozel, Rossen Stoyanchev
- 
Field SummaryFields inherited from class org.springframework.graphql.server.webmvc.AbstractGraphQlHttpHandlerlogger
- 
Constructor SummaryConstructorsConstructorDescriptionGraphQlSseHandler(WebGraphQlHandler graphQlHandler) Constructor with the handler to delegate to, and no timeout, i.e.GraphQlSseHandler(WebGraphQlHandler graphQlHandler, Duration timeout) Variant constructor with a timeout to use for SSE subscriptions.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ServerResponseprepareResponse(ServerRequest request, reactor.core.publisher.Mono<WebGraphQlResponse> responseMono) Prepare theServerResponsefor the given GraphQL response.Methods inherited from class org.springframework.graphql.server.webmvc.AbstractGraphQlHttpHandlergetWriteFunction, handleRequest
- 
Constructor Details- 
GraphQlSseHandlerConstructor with the handler to delegate to, and no timeout, i.e. relying on underlying Server async request timeout.- Parameters:
- graphQlHandler- the handler to delegate to
 
- 
GraphQlSseHandlerVariant constructor with a timeout to use for SSE subscriptions.- Parameters:
- graphQlHandler- the handler to delegate to
- timeout- the timeout value to set on- AsyncWebRequest.setTimeout(Long)
- Since:
- 1.3.3
 
 
- 
- 
Method Details- 
prepareResponseprotected ServerResponse prepareResponse(ServerRequest request, reactor.core.publisher.Mono<WebGraphQlResponse> responseMono) Description copied from class:AbstractGraphQlHttpHandlerPrepare theServerResponsefor the given GraphQL response.- Specified by:
- prepareResponsein class- AbstractGraphQlHttpHandler
- Parameters:
- request- the current request
- responseMono- the GraphQL response
- Returns:
- the server response
 
 
-