Package graphql.analysis
Interface FieldComplexityCalculator
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@PublicApi @FunctionalInterface public interface FieldComplexityCalculator
Used to calculate the complexity of a field. Used byMaxQueryComplexityInstrumentation
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
calculate(FieldComplexityEnvironment environment, int childComplexity)
Calculates the complexity of a field
-
-
-
Method Detail
-
calculate
int calculate(FieldComplexityEnvironment environment, int childComplexity)
Calculates the complexity of a field- Parameters:
environment
- several information about the current fieldchildComplexity
- the sum of all child complexity scores- Returns:
- the calculated complexity
-
-