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.
Used to calculate the complexity of a field. Used by
MaxQueryComplexityInstrumentation
.-
Method Summary
Modifier and TypeMethodDescriptionint
calculate
(FieldComplexityEnvironment environment, int childComplexity) Calculates the complexity of a field
-
Method Details
-
calculate
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
-