@PublicApi public class ExecutionContext extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addError(GraphQLError error)
This method will allow you to add errors into the running execution context, without a check
for per field unique-ness
|
void |
addError(GraphQLError error,
ExecutionPath fieldPath)
This method will only put one error per field path.
|
java.lang.Object |
getContext() |
org.dataloader.DataLoaderRegistry |
getDataLoaderRegistry() |
DeferSupport |
getDeferSupport() |
Document |
getDocument() |
java.util.List<GraphQLError> |
getErrors() |
ExecutionId |
getExecutionId() |
FragmentDefinition |
getFragment(java.lang.String name) |
java.util.Map<java.lang.String,FragmentDefinition> |
getFragmentsByName() |
GraphQLSchema |
getGraphQLSchema() |
Instrumentation |
getInstrumentation() |
InstrumentationState |
getInstrumentationState() |
ExecutionStrategy |
getMutationStrategy() |
OperationDefinition |
getOperationDefinition() |
ExecutionStrategy |
getQueryStrategy() |
<T> T |
getRoot() |
ExecutionStrategy |
getSubscriptionStrategy() |
java.util.Map<java.lang.String,java.lang.Object> |
getVariables() |
ExecutionContext |
transform(java.util.function.Consumer<ExecutionContextBuilder> builderConsumer)
This helps you transform the current ExecutionContext object into another one by starting a builder with all
the current values and allows you to transform it how you want.
|
public ExecutionId getExecutionId()
public InstrumentationState getInstrumentationState()
public Instrumentation getInstrumentation()
public GraphQLSchema getGraphQLSchema()
public java.util.Map<java.lang.String,FragmentDefinition> getFragmentsByName()
public Document getDocument()
public OperationDefinition getOperationDefinition()
public java.util.Map<java.lang.String,java.lang.Object> getVariables()
public java.lang.Object getContext()
public <T> T getRoot()
public FragmentDefinition getFragment(java.lang.String name)
public org.dataloader.DataLoaderRegistry getDataLoaderRegistry()
public void addError(GraphQLError error, ExecutionPath fieldPath)
error
- the error to addfieldPath
- the field path to put it underpublic void addError(GraphQLError error)
error
- the error to addpublic java.util.List<GraphQLError> getErrors()
public ExecutionStrategy getQueryStrategy()
public ExecutionStrategy getMutationStrategy()
public ExecutionStrategy getSubscriptionStrategy()
public DeferSupport getDeferSupport()
public ExecutionContext transform(java.util.function.Consumer<ExecutionContextBuilder> builderConsumer)
builderConsumer
- the consumer code that will be given a builder to transform