lib/graphql/analysis/query_complexity.rb in graphql-1.5.14 vs lib/graphql/analysis/query_complexity.rb in graphql-1.5.15

- old
+ new

@@ -68,10 +68,10 @@ # Selections on an object may apply differently depending on what is _actually_ returned by the resolve function. # Find the maximum possible complexity among those combinations. class TypeComplexity def initialize - @types = Hash.new { |h, k| h[k] = 0 } + @types = Hash.new(0) end # Return the max possible complexity for types in this selection def max_possible_complexity @types.each_value.max || 0