@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 |
---|---|
InstrumentationContext<ExecutionResult> |
beginExecuteOperation(InstrumentationExecuteOperationParameters parameters)
This is called just before the execution of the query operation is started.
|
beginDeferredField, beginExecution, beginExecutionStrategy, beginField, beginFieldComplete, beginFieldFetch, beginFieldListComplete, beginParse, beginValidation, createState, instrumentDataFetcher, instrumentExecutionContext, instrumentExecutionResult, instrumentSchema
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createState, instrumentDocumentAndVariables, instrumentExecutionInput
public FieldValidationInstrumentation(FieldValidation fieldValidation)
fieldValidation
- the field validation to callpublic InstrumentationContext<ExecutionResult> beginExecuteOperation(InstrumentationExecuteOperationParameters parameters)
Instrumentation
beginExecuteOperation
in interface Instrumentation
beginExecuteOperation
in class SimpleInstrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step ends