public interface GraphQlTransport
Modifier and Type | Method and Description |
---|---|
static GraphQlResponse |
createResponse(Map<String,Object> responseMap)
Factory method to create
GraphQlResponse from a GraphQL response
map for use in transport implementations. |
reactor.core.publisher.Mono<GraphQlResponse> |
execute(GraphQlRequest request)
Execute a request with a single response such as a "query" or "mutation".
|
reactor.core.publisher.Flux<GraphQlResponse> |
executeSubscription(GraphQlRequest request)
Execute a "subscription" request with a stream of responses.
|
reactor.core.publisher.Mono<GraphQlResponse> execute(GraphQlRequest request)
request
- the request to executeMono
with the GraphQlResponse
for the response.
The Mono
may end wth an error due to transport or other issues
such as failures to encode the request or decode the response.reactor.core.publisher.Flux<GraphQlResponse> executeSubscription(GraphQlRequest request)
request
- the request to executeFlux
of GraphQlResponse
responses.
The Flux
may terminate as follows:
SubscriptionErrorException
if the subscription ends with an error.
WebSocketDisconnectedException
if the connection is closed or
lost before the stream terminates.
The Flux
may be cancelled to notify the server to end the
subscription stream.
static GraphQlResponse createResponse(Map<String,Object> responseMap)
GraphQlResponse
from a GraphQL response
map for use in transport implementations.