Package graphql
Class ExecutionInput.Builder
java.lang.Object
graphql.ExecutionInput.Builder
- Enclosing class:
ExecutionInput
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Deprecated.dataLoaderRegistry(org.dataloader.DataLoaderRegistry dataLoaderRegistry) You should create newDataLoaderRegistrys and newDataLoaders for each execution.executionId(ExecutionId executionId) A default one will be assigned, but you can set your own.extensions(Map<String, Object> extensions) graphQLContext(Consumer<GraphQLContext.Builder> builderFunction) This will give you a builder ofGraphQLContextand any values you set will be copied into the underlyingGraphQLContextof this execution inputgraphQLContext(Map<?, Object> mapOfContext) This will put all the values from the map into the underlyingGraphQLContextof this execution inputlocalContext(Object localContext) Sets initial localContext in root data fetchersSets the locale to use for this operationoperationName(String operationName) profileExecution(boolean profileExecution) Adds raw (not coerced) variables
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
query
-
operationName
-
executionId
A default one will be assigned, but you can set your own.- Parameters:
executionId- an execution id object- Returns:
- this builder
-
locale
Sets the locale to use for this operation- Parameters:
locale- the locale to use- Returns:
- this builder
-
localContext
Sets initial localContext in root data fetchers- Parameters:
localContext- the local context to use- Returns:
- this builder
-
context
Deprecated.- theExecutionInput.getGraphQLContext()is a fixed mutable instance nowThe legacy context object- Parameters:
context- the context object to use- Returns:
- this builder
-
graphQLContext
This will give you a builder ofGraphQLContextand any values you set will be copied into the underlyingGraphQLContextof this execution input- Parameters:
builderFunction- a builder function you can use to put values into the context- Returns:
- this builder
-
graphQLContext
This will put all the values from the map into the underlyingGraphQLContextof this execution input- Parameters:
mapOfContext- a map of values to put in the context- Returns:
- this builder
-
root
-
variables
Adds raw (not coerced) variables- Parameters:
rawVariables- the map of raw variables- Returns:
- this builder
-
extensions
-
dataLoaderRegistry
public ExecutionInput.Builder dataLoaderRegistry(org.dataloader.DataLoaderRegistry dataLoaderRegistry) You should create newDataLoaderRegistrys and newDataLoaders for each execution. Do not re-use instances as this will create unexpected results.- Parameters:
dataLoaderRegistry- a registry ofDataLoaders- Returns:
- this builder
-
profileExecution
-
build
-
ExecutionInput.getGraphQLContext()is a fixed mutable instance now