@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.
|
beginExecution, beginExecutionStrategy, beginField, beginFieldFetch, beginParse, beginValidation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
beginFieldComplete, beginFieldListComplete, beginSubscribedFieldEvent, createState, createState, instrumentDataFetcher, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionInput, instrumentExecutionResult, instrumentSchema
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