@PublicApi public class FieldValidationInstrumentation extends SimpleInstrumentation
Instrumentation
allows you to validate the fields
of the query before the query is executed. You need to provide an implementation of
FieldValidation
that is called to validate fields. If it returns errors
then the query execution will be aborted and the errors will be returned
in the execution resultFieldValidation
INSTANCE
Constructor and Description |
---|
FieldValidationInstrumentation(FieldValidation fieldValidation)
Your field validation will be called before query execution
|
Modifier and Type | Method and Description |
---|---|
@Nullable InstrumentationContext<ExecutionResult> |
beginExecuteOperation(InstrumentationExecuteOperationParameters parameters,
InstrumentationState state)
This is called just before the execution of the query operation is started.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beginExecuteOperation, beginExecution, beginExecution, beginExecutionStrategy, beginExecutionStrategy, beginField, beginField, beginFieldComplete, beginFieldComplete, beginFieldFetch, beginFieldFetch, beginFieldListComplete, beginFieldListComplete, beginParse, beginParse, beginSubscribedFieldEvent, beginSubscribedFieldEvent, beginValidation, beginValidation, createState, createState, instrumentDataFetcher, instrumentDataFetcher, instrumentDocumentAndVariables, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionContext, instrumentExecutionInput, instrumentExecutionInput, instrumentExecutionResult, instrumentExecutionResult, instrumentSchema, instrumentSchema
public FieldValidationInstrumentation(FieldValidation fieldValidation)
fieldValidation
- the field validation to call@Nullable public @Nullable InstrumentationContext<ExecutionResult> beginExecuteOperation(InstrumentationExecuteOperationParameters parameters, InstrumentationState state)
Instrumentation
parameters
- the parameters to this stepstate
- the state created during the call to Instrumentation.createState(InstrumentationCreateStateParameters)
InstrumentationContext
object that will be called back when the step ends (assuming it's not null)