public interface GraphQlClient
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.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
GraphQlClient.Builder<B extends GraphQlClient.Builder<B>>
Defines a builder for creating
GraphQlClient instances. |
static interface |
GraphQlClient.RequestSpec
Declare options to gather input for a GraphQL request and execute it.
|
static interface |
GraphQlClient.RetrieveSpec
Declares options to decode a field for a single response operation.
|
static interface |
GraphQlClient.RetrieveSubscriptionSpec
Declares options to decode a field in each response of a subscription.
|
| Modifier and Type | Method and Description |
|---|---|
static GraphQlClient.Builder<?> |
builder(GraphQlTransport transport)
Create a builder with the given custom
GraphQlTransport. |
GraphQlClient.RequestSpec |
document(String document)
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.
|
GraphQlClient.RequestSpec |
documentName(String name)
Variant of
document(String) that uses the given key to resolve
the GraphQL document from a file with the help of the configured
DocumentSource. |
GraphQlClient.Builder<?> |
mutate()
Return a builder initialized from the configuration of "this" client
to use to build a new, independently configured client instance.
|
GraphQlClient.RequestSpec document(String document)
document - the document for the requestGraphQlClient.RequestSpec documentName(String name)
document(String) that uses the given key to resolve
the GraphQL document from a file with the help of the configured
DocumentSource.IllegalArgumentException - if the content could not be loadedGraphQlClient.Builder<?> mutate()
static GraphQlClient.Builder<?> builder(GraphQlTransport transport)
GraphQlTransport.
For most cases, use a transport specific extension such as
HttpGraphQlClient or WebSocketGraphQlClient. This method
is for use with a custom GraphQlTransport.
transport - the transport to execute requests with