Interface WebSocketGraphQlClient
- All Superinterfaces:
GraphQlClient,WebGraphQlClient
GraphQL over WebSocket client that uses
WebSocketClient.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for a GraphQL over WebSocket client.Nested classes/interfaces inherited from interface org.springframework.graphql.client.GraphQlClient
GraphQlClient.BaseBuilder<B extends GraphQlClient.BaseBuilder<B>>, GraphQlClient.RequestSpec, GraphQlClient.RetrieveSpec, GraphQlClient.RetrieveSubscriptionSpec, GraphQlClient.RetrieveSyncSpec, GraphQlClient.SyncBuilder<B extends GraphQlClient.SyncBuilder<B>> -
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketGraphQlClient.Builder<?> builder(String url, WebSocketClient webSocketClient) Return a builder for aWebSocketGraphQlClient.static WebSocketGraphQlClient.Builder<?> builder(URI url, WebSocketClient webSocketClient) Return a builder for aWebSocketGraphQlClient.static WebSocketGraphQlClientcreate(URI url, WebSocketClient webSocketClient) Create aWebSocketGraphQlClient.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 withCloseStatus.NORMALand terminating in-progress requests with an error signal.Methods inherited from interface org.springframework.graphql.client.GraphQlClient
document, documentName
-
Method Details
-
start
reactor.core.publisher.Mono<Void> start()Start the GraphQL session by connecting the WebSocket, sending the "connection_init" and receiving the "connection_ack" message.Note: Only one session is started at a time. Additional attempts to start have no impact while a session is active.
- Returns:
Monothat completes when the WebSocket is connected and the GraphQL session is ready to send requests
-
stop
reactor.core.publisher.Mono<Void> stop()Stop the GraphQL session by closing the WebSocket withCloseStatus.NORMALand 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.- Returns:
Monothat completes when the underlying session is closed
-
mutate
WebSocketGraphQlClient.Builder<?> mutate()Description copied from interface:GraphQlClientReturn a builder initialized from the configuration of "this" client to use to build a new, independently configured client instance.- Specified by:
mutatein interfaceGraphQlClient- Specified by:
mutatein interfaceWebGraphQlClient
-
create
Create aWebSocketGraphQlClient.- Parameters:
url- the GraphQL endpoint URLwebSocketClient- the underlying transport client to use
-
builder
Return a builder for aWebSocketGraphQlClient.- Parameters:
url- the GraphQL endpoint URLwebSocketClient- the underlying transport client to use
-
builder
Return a builder for aWebSocketGraphQlClient.- Parameters:
url- the GraphQL endpoint URLwebSocketClient- the underlying transport client to use
-