public interface WebSocketGraphQlClient extends WebGraphQlClient
WebSocketClient
.Modifier and Type | Interface and Description |
---|---|
static interface |
WebSocketGraphQlClient.Builder<B extends WebSocketGraphQlClient.Builder<B>>
Builder for a GraphQL over WebSocket client.
|
GraphQlClient.RequestSpec, GraphQlClient.RetrieveSpec, GraphQlClient.RetrieveSubscriptionSpec
Modifier and Type | Method and Description |
---|---|
static WebSocketGraphQlClient.Builder<?> |
builder(String url,
WebSocketClient webSocketClient)
Return a builder for a
WebSocketGraphQlClient . |
static WebSocketGraphQlClient.Builder<?> |
builder(URI url,
WebSocketClient webSocketClient)
Return a builder for a
WebSocketGraphQlClient . |
static WebSocketGraphQlClient |
create(URI url,
WebSocketClient webSocketClient)
Create a
WebSocketGraphQlClient . |
WebSocketGraphQlClient.Builder<?> |
mutate()
Return a builder initialized from the configuration of "this" client
to use to build a new, independently configured client instance.
|
reactor.core.publisher.Mono<Void> |
start()
Start the GraphQL session by connecting the WebSocket, sending the
"connection_init" and receiving the "connection_ack" message.
|
reactor.core.publisher.Mono<Void> |
stop()
Stop the GraphQL session by closing the WebSocket with
CloseStatus.NORMAL and
terminating in-progress requests with an error signal. |
builder, document, documentName
reactor.core.publisher.Mono<Void> start()
Note: Only one session is started at a time. Additional attempts to start have no impact while a session is active.
Mono
that completes when the WebSocket is connected and
the GraphQL session is ready to send requestsreactor.core.publisher.Mono<Void> stop()
CloseStatus.NORMAL
and
terminating in-progress requests with an error signal.
New requests are rejected from the time of this call. If necessary,
call start()
to allow requests again.
Mono
that completes when the underlying session is closedWebSocketGraphQlClient.Builder<?> mutate()
GraphQlClient
mutate
in interface GraphQlClient
mutate
in interface WebGraphQlClient
static WebSocketGraphQlClient create(URI url, WebSocketClient webSocketClient)
WebSocketGraphQlClient
.url
- the GraphQL endpoint URLwebSocketClient
- the underlying transport client to usestatic WebSocketGraphQlClient.Builder<?> builder(String url, WebSocketClient webSocketClient)
WebSocketGraphQlClient
.url
- the GraphQL endpoint URLwebSocketClient
- the underlying transport client to usestatic WebSocketGraphQlClient.Builder<?> builder(URI url, WebSocketClient webSocketClient)
WebSocketGraphQlClient
.url
- the GraphQL endpoint URLwebSocketClient
- the underlying transport client to use