Class InstrumentationFieldParameters
- java.lang.Object
-
- graphql.execution.instrumentation.parameters.InstrumentationFieldParameters
-
- Direct Known Subclasses:
InstrumentationFieldFetchParameters
@PublicApi public class InstrumentationFieldParameters extends java.lang.Object
Parameters sent toInstrumentation
methods
-
-
Constructor Summary
Constructors Constructor Description InstrumentationFieldParameters(ExecutionContext executionContext, java.util.function.Supplier<ExecutionStepInfo> executionStepInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExecutionContext
getExecutionContext()
ExecutionStepInfo
getExecutionStepInfo()
GraphQLFieldDefinition
getField()
<T extends InstrumentationState>
TgetInstrumentationState()
Deprecated.state is now passed in direct to instrumentation methodsInstrumentationFieldParameters
withNewState(InstrumentationState instrumentationState)
Deprecated.state is now passed in direct to instrumentation methods
-
-
-
Constructor Detail
-
InstrumentationFieldParameters
public InstrumentationFieldParameters(ExecutionContext executionContext, java.util.function.Supplier<ExecutionStepInfo> executionStepInfo)
-
-
Method Detail
-
withNewState
@Deprecated public InstrumentationFieldParameters 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
-
getExecutionContext
public ExecutionContext getExecutionContext()
-
getField
public GraphQLFieldDefinition getField()
-
getExecutionStepInfo
public ExecutionStepInfo getExecutionStepInfo()
-
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)
-
-