class GraphQL::Analysis::QueryComplexity::TypeComplexity
Find the maximum possible complexity among those combinations.
Selections on an object may apply differently depending on what is actually returned by the resolve function.
def initialize
def initialize @types = Hash.new { |h, k| h[k] = 0 } end
def max_possible_complexity
def max_possible_complexity @types.each_value.max || 0 end
def merge(type_defn, complexity)
Store the complexity for the branch on `type_defn`.
def merge(type_defn, complexity) @types[type_defn] += complexity end