Class InstrumentationFieldParameters
java.lang.Object
graphql.execution.instrumentation.parameters.InstrumentationFieldParameters
- Direct Known Subclasses:
InstrumentationFieldFetchParameters
Parameters sent to
Instrumentation
methods-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutionContext
private final Supplier
<ExecutionStepInfo> private final InstrumentationState
-
Constructor Summary
ConstructorsConstructorDescriptionInstrumentationFieldParameters
(ExecutionContext executionContext, Supplier<ExecutionStepInfo> executionStepInfo) InstrumentationFieldParameters
(ExecutionContext executionContext, Supplier<ExecutionStepInfo> executionStepInfo, InstrumentationState instrumentationState) -
Method Summary
Modifier and TypeMethodDescriptiongetField()
<T extends InstrumentationState>
TDeprecated.state is now passed in direct to instrumentation methodswithNewState
(InstrumentationState instrumentationState) Deprecated.state is now passed in direct to instrumentation methods
-
Field Details
-
executionContext
-
executionStepInfo
-
instrumentationState
-
-
Constructor Details
-
InstrumentationFieldParameters
public InstrumentationFieldParameters(ExecutionContext executionContext, Supplier<ExecutionStepInfo> executionStepInfo) -
InstrumentationFieldParameters
InstrumentationFieldParameters(ExecutionContext executionContext, Supplier<ExecutionStepInfo> executionStepInfo, InstrumentationState instrumentationState)
-
-
Method Details
-
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
-
getField
-
getExecutionStepInfo
-
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)
-