@PublicApi public class FieldValidationInstrumentation extends NoOpInstrumentation
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 resultFieldValidationNoOpInstrumentation.NoOpInstrumentationContext<T>INSTANCE| Constructor and Description |
|---|
FieldValidationInstrumentation(FieldValidation fieldValidation)
Your field validation will be called before query execution
|
| Modifier and Type | Method and Description |
|---|---|
InstrumentationContext<ExecutionResult> |
beginDataFetch(InstrumentationDataFetchParameters parameters)
This is called just before the data fetching stage is started, waits for all data to be completed and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
beginCompleteField, beginCompleteFieldList, beginDataFetchDispatch, beginExecution, beginExecutionStrategy, beginField, beginFieldFetch, beginFields, beginParse, beginValidation, createState, instrumentDataFetcher, instrumentExecutionContext, instrumentExecutionResult, instrumentSchemaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstrumentExecutionInputpublic FieldValidationInstrumentation(FieldValidation fieldValidation)
fieldValidation - the field validation to callpublic InstrumentationContext<ExecutionResult> beginDataFetch(InstrumentationDataFetchParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginDataFetch in interface InstrumentationbeginDataFetch in class NoOpInstrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step ends