Interface WebGraphQlHandler
public interface WebGraphQlHandler
Contract for common handling of a GraphQL request over HTTP or WebSocket,
for use with Spring MVC or Spring WebFlux.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Builder for aWebGraphQlHandler
that executes aWebGraphQlInterceptor
chain followed by aExecutionGraphQlService
. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebGraphQlHandler.Builder
builder
(ExecutionGraphQlService graphQlService) Provides access to a builder to create aWebGraphQlHandler
instance.io.micrometer.context.ContextSnapshotFactory
Return theconfigured
ContextSnapshotFactory
instance to use.Return the single interceptor of typeWebSocketGraphQlInterceptor
among all the configured interceptors.reactor.core.publisher.Mono<WebGraphQlResponse>
handleRequest
(WebGraphQlRequest request) Execute the given request and return the response.
-
Method Details
-
getWebSocketInterceptor
WebSocketGraphQlInterceptor getWebSocketInterceptor()Return the single interceptor of typeWebSocketGraphQlInterceptor
among all the configured interceptors. -
contextSnapshotFactory
io.micrometer.context.ContextSnapshotFactory contextSnapshotFactory()Return theconfigured
ContextSnapshotFactory
instance to use.- Since:
- 1.3.0
-
handleRequest
Execute the given request and return the response.- Parameters:
request
- the request to execute- Returns:
- the response
-
builder
Provides access to a builder to create aWebGraphQlHandler
instance.- Parameters:
graphQlService
- theExecutionGraphQlService
to use for actual execution of the request.- Returns:
- a builder for a WebGraphQlHandler
-