Class ComplexityAnalyzer
- java.lang.Object
-
- io.leangen.graphql.execution.complexity.ComplexityAnalyzer
-
public class ComplexityAnalyzer extends Object
Class used to perform static complexity analysis on the parsed operation AST. It recursively walks the AST and accumulates the complexity scores. Once the threshold is exceeded, it throws aComplexityLimitExceededException. The complexity score calculation for each node is delegated toComplexityFunction.
-
-
Constructor Summary
Constructors Constructor Description ComplexityAnalyzer(int maxComplexity, ComplexityFunction complexityFunction, TypeRegistry typeRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomplexity(graphql.execution.ExecutionContext context)
-
-
-
Constructor Detail
-
ComplexityAnalyzer
public ComplexityAnalyzer(int maxComplexity, ComplexityFunction complexityFunction, TypeRegistry typeRegistry)
-
-