lib/graphql/analysis/ast/field_usage.rb in graphql-2.0.8 vs lib/graphql/analysis/ast/field_usage.rb in graphql-2.0.9

- old
+ new

@@ -37,12 +37,14 @@ argument_values.each_pair do |_argument_name, argument| if argument.definition.deprecation_reason @used_deprecated_arguments << argument.definition.path end + next if argument.value.nil? + if argument.definition.type.kind.input_object? extract_deprecated_arguments(argument.value.arguments.argument_values) # rubocop:disable Development/ContextIsPassedCop -- runtime args instance - elsif argument.definition.type.list? && !argument.value.nil? + elsif argument.definition.type.list? argument .value .select { |value| value.respond_to?(:arguments) } .each { |value| extract_deprecated_arguments(value.arguments.argument_values) } # rubocop:disable Development/ContextIsPassedCop -- runtime args instance end