public static class ExecutionInput.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ExecutionInput |
build() |
ExecutionInput.Builder |
cacheControl(CacheControl cacheControl) |
ExecutionInput.Builder |
context(GraphQLContext.Builder contextBuilder) |
ExecutionInput.Builder |
context(java.lang.Object context)
By default you will get a
GraphQLContext object but you can set your own. |
ExecutionInput.Builder |
context(java.util.function.UnaryOperator<GraphQLContext.Builder> contextBuilderFunction) |
ExecutionInput.Builder |
dataLoaderRegistry(org.dataloader.DataLoaderRegistry dataLoaderRegistry)
You should create new
DataLoaderRegistry s and new DataLoader s for each execution. |
ExecutionInput.Builder |
executionId(ExecutionId executionId)
A default one will be assigned, but you can set your own.
|
ExecutionInput.Builder |
locale(java.util.Locale locale)
Sets the locale to use for this operation
|
ExecutionInput.Builder |
operationName(java.lang.String operationName) |
ExecutionInput.Builder |
query(java.lang.String query) |
ExecutionInput.Builder |
root(java.lang.Object root) |
ExecutionInput.Builder |
variables(java.util.Map<java.lang.String,java.lang.Object> variables) |
public ExecutionInput.Builder query(java.lang.String query)
public ExecutionInput.Builder operationName(java.lang.String operationName)
public ExecutionInput.Builder executionId(ExecutionId executionId)
executionId
- an execution id objectpublic ExecutionInput.Builder locale(java.util.Locale locale)
locale
- the locale to usepublic ExecutionInput.Builder context(java.lang.Object context)
GraphQLContext
object but you can set your own.context
- the context object to usepublic ExecutionInput.Builder context(GraphQLContext.Builder contextBuilder)
public ExecutionInput.Builder context(java.util.function.UnaryOperator<GraphQLContext.Builder> contextBuilderFunction)
public ExecutionInput.Builder root(java.lang.Object root)
public ExecutionInput.Builder variables(java.util.Map<java.lang.String,java.lang.Object> variables)
public ExecutionInput.Builder dataLoaderRegistry(org.dataloader.DataLoaderRegistry dataLoaderRegistry)
DataLoaderRegistry
s and new DataLoader
s for each execution. Do not
re-use
instances as this will create unexpected results.dataLoaderRegistry
- a registry of DataLoader
spublic ExecutionInput.Builder cacheControl(CacheControl cacheControl)
public ExecutionInput build()