public class DefaultGraphQlRequest extends Object implements GraphQlRequest
GraphQlRequest
.Constructor and Description |
---|
DefaultGraphQlRequest(String document)
Create a request.
|
DefaultGraphQlRequest(String document,
String operationName,
Map<String,Object> variables,
Map<String,Object> extensions)
Create a request with a complete set of inputs.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getDocument()
Return the GraphQL document which is the textual representation of an
operation (or operations) to perform, including any selection sets and
fragments.
|
Map<String,Object> |
getExtensions()
Return implementor specific, protocol extensions, if any.
|
String |
getOperationName()
Return the name of the operation in the
document
to execute, if the document contains multiple operations. |
Map<String,Object> |
getVariables()
Return values for variable defined by the operation.
|
int |
hashCode() |
Map<String,Object> |
toMap()
Convert the request to a
Map as defined in
GraphQL over HTTP and
GraphQL over WebSocket:
KeyValue
querydocument
operationNameoperationName
variablesvariables
|
String |
toString() |
public DefaultGraphQlRequest(String document)
document
- textual representation of the operation(s)public DefaultGraphQlRequest(String document, @Nullable String operationName, @Nullable Map<String,Object> variables, @Nullable Map<String,Object> extensions)
document
- textual representation of the operation(s)operationName
- optionally, the name of the operation to executevariables
- variables by which the operation is parameterizedextensions
- implementor specific, protocol extensionspublic String getDocument()
GraphQlRequest
getDocument
in interface GraphQlRequest
@Nullable public String getOperationName()
GraphQlRequest
document
to execute, if the document contains multiple operations.getOperationName
in interface GraphQlRequest
public Map<String,Object> getVariables()
GraphQlRequest
getVariables
in interface GraphQlRequest
public Map<String,Object> getExtensions()
GraphQlRequest
getExtensions
in interface GraphQlRequest
public Map<String,Object> toMap()
GraphQlRequest
Map
as defined in
GraphQL over HTTP and
GraphQL over WebSocket:
Key | Value |
---|---|
query | document |
operationName | operationName |
variables | variables |
toMap
in interface GraphQlRequest