Class: GraphQL::Analysis::AST::QueryComplexity::ConcreteTypeComplexity

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/analysis/ast/query_complexity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConcreteTypeComplexity

Returns a new instance of ConcreteTypeComplexity



112
113
114
# File 'lib/graphql/analysis/ast/query_complexity.rb', line 112

def initialize
  @max_possible_complexity = 0
end

Instance Attribute Details

#max_possible_complexityObject (readonly)

Returns the value of attribute max_possible_complexity



110
111
112
# File 'lib/graphql/analysis/ast/query_complexity.rb', line 110

def max_possible_complexity
  @max_possible_complexity
end

Instance Method Details

#merge(complexity) ⇒ Object



116
117
118
# File 'lib/graphql/analysis/ast/query_complexity.rb', line 116

def merge(complexity)
  @max_possible_complexity += complexity
end