Class InstrumentationExecutionParameters
- java.lang.Object
-
- graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters
-
- Direct Known Subclasses:
InstrumentationValidationParameters
@PublicApi public class InstrumentationExecutionParameters extends java.lang.Object
Parameters sent toInstrumentationmethods
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectcontextprivate ExecutionInputexecutionInputprivate GraphQLContextgraphQLContextprivate InstrumentationStateinstrumentationStateprivate java.lang.Stringoperationprivate java.lang.Stringqueryprivate GraphQLSchemaschemaprivate java.util.Map<java.lang.String,java.lang.Object>variables
-
Constructor Summary
Constructors Constructor Description InstrumentationExecutionParameters(ExecutionInput executionInput, GraphQLSchema schema, InstrumentationState instrumentationState)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> TgetContext()Deprecated.usegetGraphQLContext()insteadExecutionInputgetExecutionInput()GraphQLContextgetGraphQLContext()<T extends InstrumentationState>
TgetInstrumentationState()Deprecated.state is now passed in direct to instrumentation methodsjava.lang.StringgetOperation()java.lang.StringgetQuery()GraphQLSchemagetSchema()java.util.Map<java.lang.String,java.lang.Object>getVariables()InstrumentationExecutionParameterswithNewState(InstrumentationState instrumentationState)Deprecated.state is now passed in direct to instrumentation methods
-
-
-
Field Detail
-
executionInput
private final ExecutionInput executionInput
-
query
private final java.lang.String query
-
operation
private final java.lang.String operation
-
context
private final java.lang.Object context
-
graphQLContext
private final GraphQLContext graphQLContext
-
variables
private final java.util.Map<java.lang.String,java.lang.Object> variables
-
instrumentationState
private final InstrumentationState instrumentationState
-
schema
private final GraphQLSchema schema
-
-
Constructor Detail
-
InstrumentationExecutionParameters
public InstrumentationExecutionParameters(ExecutionInput executionInput, GraphQLSchema schema, InstrumentationState instrumentationState)
-
-
Method Detail
-
withNewState
@Deprecated public InstrumentationExecutionParameters withNewState(InstrumentationState instrumentationState)
Deprecated.state is now passed in direct to instrumentation methodsReturns a cloned parameters object with the new state- Parameters:
instrumentationState- the new state for this parameters object- Returns:
- a new parameters object with the new state
-
getExecutionInput
public ExecutionInput getExecutionInput()
-
getQuery
public java.lang.String getQuery()
-
getOperation
public java.lang.String getOperation()
-
getContext
@Deprecated public <T> T getContext()
Deprecated.usegetGraphQLContext()instead- Type Parameters:
T- for two- Returns:
- the legacy context
-
getGraphQLContext
public GraphQLContext getGraphQLContext()
-
getVariables
public java.util.Map<java.lang.String,java.lang.Object> getVariables()
-
getInstrumentationState
@Deprecated public <T extends InstrumentationState> T getInstrumentationState()
Deprecated.state is now passed in direct to instrumentation methodsPreviously the instrumentation parameters had access to the state created viaInstrumentation.createState(InstrumentationCreateStateParameters)but now to save object allocations, the state is passed directly into instrumentation methods- Type Parameters:
T- for two- Returns:
- the state created previously during a call to
Instrumentation.createState(InstrumentationCreateStateParameters)
-
getSchema
public GraphQLSchema getSchema()
-
-