public static class ExecutionInput.Builder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
extensions |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ExecutionInput |
build() |
ExecutionInput.Builder |
cacheControl(CacheControl cacheControl) |
ExecutionInput.Builder |
context(GraphQLContext.Builder contextBuilder)
Deprecated.
- the
ExecutionInput.getGraphQLContext() is a fixed mutable instance now |
ExecutionInput.Builder |
context(java.lang.Object context)
Deprecated.
- the
ExecutionInput.getGraphQLContext() is a fixed mutable instance now |
ExecutionInput.Builder |
context(java.util.function.UnaryOperator<GraphQLContext.Builder> contextBuilderFunction)
Deprecated.
- the
ExecutionInput.getGraphQLContext() is a fixed mutable instance now |
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 |
extensions(java.util.Map<java.lang.String,java.lang.Object> extensions) |
ExecutionInput.Builder |
graphQLContext(java.util.function.Consumer<GraphQLContext.Builder> builderFunction)
This will give you a builder of
GraphQLContext and any values you set will be copied
into the underlying GraphQLContext of this execution input |
ExecutionInput.Builder |
graphQLContext(java.util.Map<?,java.lang.Object> mapOfContext)
This will put all the values from the map into the underlying
GraphQLContext of this execution input |
ExecutionInput.Builder |
localContext(java.lang.Object localContext)
Sets initial localContext in root data fetchers
|
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> rawVariables)
Adds raw (not coerced) 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 localContext(java.lang.Object localContext)
localContext
- the local context to use@Deprecated public ExecutionInput.Builder context(java.lang.Object context)
ExecutionInput.getGraphQLContext()
is a fixed mutable instance nowcontext
- the context object to use@Deprecated public ExecutionInput.Builder context(GraphQLContext.Builder contextBuilder)
ExecutionInput.getGraphQLContext()
is a fixed mutable instance nowcontextBuilder
- the context builder object to use@Deprecated public ExecutionInput.Builder context(java.util.function.UnaryOperator<GraphQLContext.Builder> contextBuilderFunction)
ExecutionInput.getGraphQLContext()
is a fixed mutable instance nowcontextBuilderFunction
- the context builder function to usepublic ExecutionInput.Builder graphQLContext(java.util.function.Consumer<GraphQLContext.Builder> builderFunction)
GraphQLContext
and any values you set will be copied
into the underlying GraphQLContext
of this execution inputbuilderFunction
- a builder function you can use to put values into the contextpublic ExecutionInput.Builder graphQLContext(java.util.Map<?,java.lang.Object> mapOfContext)
GraphQLContext
of this execution inputmapOfContext
- a map of values to put in the contextpublic ExecutionInput.Builder root(java.lang.Object root)
public ExecutionInput.Builder variables(java.util.Map<java.lang.String,java.lang.Object> rawVariables)
rawVariables
- the map of raw variablespublic ExecutionInput.Builder extensions(java.util.Map<java.lang.String,java.lang.Object> extensions)
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()