Interface GraphQlClient
- All Known Subinterfaces:
- HttpGraphQlClient,- HttpSyncGraphQlClient,- RSocketGraphQlClient,- WebGraphQlClient,- WebSocketGraphQlClient
- All Known Implementing Classes:
- AbstractDelegatingGraphQlClient
public interface GraphQlClient
Define a workflow to execute GraphQL requests that is independent of the
 underlying transport.
 
For most cases, use a transport specific extension:
Alternatively, create an instance with any other transport via
 builder(GraphQlTransport). Or create a transport specific extension
 similar to HTTP and WebSocket.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceGraphQlClient.BaseBuilder<B extends GraphQlClient.BaseBuilder<B>>Base builder for creating and initializing aGraphQlClient.static interfaceGraphQlClient.Builder<B extends GraphQlClient.Builder<B>>Builder to create aGraphQlClientwith a non-blocking execution chain and transport.static interfaceDeclare options to gather input for a GraphQL request and execute it.static interfaceDeclares options to decode a field in a single response.static interfaceDeclares options to decode a field in each response of a subscription.static interfaceDeclares options to decode a field in a single response.static interfaceGraphQlClient.SyncBuilder<B extends GraphQlClient.SyncBuilder<B>>Builder to create aGraphQlClientinstance with a synchronous execution chain and transport.
- 
Method SummaryModifier and TypeMethodDescriptionstatic GraphQlClient.Builder<?> builder(GraphQlTransport transport) Create a builder with the given customGraphQlTransport.Start defining a GraphQL request with the given document, which is the textual representation of an operation (or operations) to perform, including selection sets and fragments.documentName(String name) Variant ofdocument(String)that uses the given key to resolve the GraphQL document from a file with the help of the configuredDocumentSource.mutate()Return a builder initialized from the configuration of "this" client to use to build a new, independently configured client instance.
- 
Method Details- 
documentStart defining a GraphQL request with the given document, which is the textual representation of an operation (or operations) to perform, including selection sets and fragments.- Parameters:
- document- the document for the request
- Returns:
- spec to further define or execute the request
 
- 
documentNameVariant ofdocument(String)that uses the given key to resolve the GraphQL document from a file with the help of the configuredDocumentSource.- Parameters:
- name- the document name
- Throws:
- IllegalArgumentException- if the content could not be loaded
 
- 
mutateGraphQlClient.BaseBuilder<?> mutate()Return a builder initialized from the configuration of "this" client to use to build a new, independently configured client instance.
- 
builderCreate a builder with the given customGraphQlTransport.For most cases, use a transport specific extension such as HttpGraphQlClientorWebSocketGraphQlClient. This method is for use with a customGraphQlTransport.- Parameters:
- transport- the transport to execute requests with
- Returns:
- the builder for further initialization
 
 
-