public class RequestInput extends Object
ExecutionInput
via toExecutionInput()
and the ExecutionInput
further customized via configureExecutionInput(BiFunction)
.Constructor and Description |
---|
RequestInput(Map<String,Object> body) |
RequestInput(String query,
String operationName,
Map<String,Object> vars) |
Modifier and Type | Method and Description |
---|---|
void |
configureExecutionInput(BiFunction<ExecutionInput,ExecutionInput.Builder,ExecutionInput> configurer)
Provide a consumer to configure the
ExecutionInput used for input to
GraphQL.executeAsync(ExecutionInput) . |
String |
getOperationName()
Return the operation name extracted from the request body or
null if not
provided. |
String |
getQuery()
Return the query name extracted from the request body.
|
Map<String,Object> |
getVariables()
Return the variables that can be referenced via $syntax extracted from the request
body or a
null if not provided. |
ExecutionInput |
toExecutionInput()
Create the
ExecutionInput for request execution. |
Map<String,Object> |
toMap()
Return a Map representation of the request input.
|
String |
toString() |
public RequestInput(String query, @Nullable String operationName, @Nullable Map<String,Object> vars)
public String getQuery()
@Nullable public String getOperationName()
null
if not
provided.null
public Map<String,Object> getVariables()
null
if not provided.null
public void configureExecutionInput(BiFunction<ExecutionInput,ExecutionInput.Builder,ExecutionInput> configurer)
ExecutionInput
used for input to
GraphQL.executeAsync(ExecutionInput)
. The builder is initially
populated with the values from getQuery()
, getOperationName()
,
and getVariables()
.configurer
- a BiFunction
with the current ExecutionInput
and
a builder to modify it.public ExecutionInput toExecutionInput()
ExecutionInput
for request execution. This is initially
populated from getQuery()
, getOperationName()
, and
getVariables()
, and is then further customized through
configureExecutionInput(BiFunction)
.public Map<String,Object> toMap()