@PublicApi public class MaxQueryComplexityInstrumentation extends NoOpInstrumentation
NoOpInstrumentation.NoOpInstrumentationContext<T>INSTANCE| Constructor and Description |
|---|
MaxQueryComplexityInstrumentation(int maxComplexity)
new Instrumentation with default complexity calculator which is `1 + childComplexity`
|
MaxQueryComplexityInstrumentation(int maxComplexity,
FieldComplexityCalculator fieldComplexityCalculator)
new Instrumentation with custom complexity calculator
|
| Modifier and Type | Method and Description |
|---|---|
InstrumentationContext<java.util.List<ValidationError>> |
beginValidation(InstrumentationValidationParameters parameters)
This is called just before the parsed query Document is validated and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
beginDataFetch, beginExecution, beginExecutionStrategy, beginField, beginFieldFetch, beginParseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateState, instrumentDataFetcher, instrumentExecutionResultpublic MaxQueryComplexityInstrumentation(int maxComplexity)
maxComplexity - max allowed complexity, otherwise execution will be abortedpublic MaxQueryComplexityInstrumentation(int maxComplexity,
FieldComplexityCalculator fieldComplexityCalculator)
maxComplexity - max allowed complexity, otherwise execution will be abortedfieldComplexityCalculator - custom complexity calculatorpublic InstrumentationContext<java.util.List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginValidation in interface InstrumentationbeginValidation in class NoOpInstrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step ends