@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, beginParse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createState, instrumentDataFetcher, instrumentExecutionResult
public 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)
Instrumentation
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginValidation
in interface Instrumentation
beginValidation
in class NoOpInstrumentation
parameters
- the parameters to this stepInstrumentationContext
object that will be called back when the step ends