public class RequestInput
extends java.lang.Object
ExecutionInput via toExecutionInput() and the
ExecutionInput further customized via
configureExecutionInput(BiFunction).| Constructor and Description |
|---|
RequestInput(java.lang.String query,
java.lang.String operationName,
java.util.Map<java.lang.String,java.lang.Object> variables,
java.util.Locale locale,
java.lang.String id)
Create an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configureExecutionInput(java.util.function.BiFunction<graphql.ExecutionInput,graphql.ExecutionInput.Builder,graphql.ExecutionInput> configurer)
Provide a consumer to configure the
ExecutionInput used for input to
GraphQL.executeAsync(ExecutionInput). |
java.lang.String |
getId()
Return an identifier for the request.
|
java.util.Locale |
getLocale()
Return the locale associated with the request.
|
java.lang.String |
getOperationName()
Return the explicitly assigned name for the query.
|
java.lang.String |
getQuery()
Return the query, mutation, or subscription for the request.
|
java.util.Map<java.lang.String,java.lang.Object> |
getVariables()
Return values for variable referenced within the query via $syntax.
|
graphql.ExecutionInput |
toExecutionInput()
Create the
ExecutionInput for request execution. |
java.util.Map<java.lang.String,java.lang.Object> |
toMap()
Return a Map representation of the request input.
|
java.lang.String |
toString() |
public RequestInput(java.lang.String query,
@Nullable
java.lang.String operationName,
@Nullable
java.util.Map<java.lang.String,java.lang.Object> variables,
@Nullable
java.util.Locale locale,
java.lang.String id)
query - the query, mutation, or subscription for the requestoperationName - an optional, explicit name assigned to the queryvariables - variables by which the query is parameterizedlocale - the locale associated with the request, if anyid - the request id, to be used as the ExecutionIdpublic java.lang.String getId()
ExecutionId of the execution input.
For web transports, this identifier can be used to correlate request and response messages on a multiplexed connection.
public java.lang.String getQuery()
@Nullable public java.lang.String getOperationName()
null.public java.util.Map<java.lang.String,java.lang.Object> getVariables()
@Nullable public java.util.Locale getLocale()
null.public void configureExecutionInput(java.util.function.BiFunction<graphql.ExecutionInput,graphql.ExecutionInput.Builder,graphql.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 graphql.ExecutionInput toExecutionInput()
ExecutionInput for request execution. This is initially
populated from getQuery(), getOperationName(), and
getVariables(), and is then further customized through
configureExecutionInput(BiFunction).public java.util.Map<java.lang.String,java.lang.Object> toMap()
public java.lang.String toString()
toString in class java.lang.Object