Class InstrumentationExecutionParameters
- java.lang.Object
-
- graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters
-
- Direct Known Subclasses:
InstrumentationValidationParameters
@PublicApi public class InstrumentationExecutionParameters extends java.lang.Object
Parameters sent toInstrumentation
methods
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
context
private ExecutionInput
executionInput
private GraphQLContext
graphQLContext
private InstrumentationState
instrumentationState
private java.lang.String
operation
private java.lang.String
query
private GraphQLSchema
schema
private 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> T
getContext()
Deprecated.usegetGraphQLContext()
insteadExecutionInput
getExecutionInput()
GraphQLContext
getGraphQLContext()
<T extends InstrumentationState>
TgetInstrumentationState()
Deprecated.state is now passed in direct to instrumentation methodsjava.lang.String
getOperation()
java.lang.String
getQuery()
GraphQLSchema
getSchema()
java.util.Map<java.lang.String,java.lang.Object>
getVariables()
InstrumentationExecutionParameters
withNewState(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()
-
-