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 by MaxQueryComplexityInstrumentation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    calculate(FieldComplexityEnvironment environment, int childComplexity)
    Calculates the complexity of a field
  • Method Details

    • calculate

      int calculate(FieldComplexityEnvironment environment, int childComplexity)
      Calculates the complexity of a field
      Parameters:
      environment - several information about the current field
      childComplexity - the sum of all child complexity scores
      Returns:
      the calculated complexity