lib/graphql/query/literal_input.rb in graphql-0.11.0 vs lib/graphql/query/literal_input.rb in graphql-0.11.1
- old
+ new
@@ -53,10 +53,12 @@
hash[arg.name] = LiteralInput.coerce(field_type, arg.value, variables)
end
type.input_fields.each do |arg_name, arg_defn|
if hash[arg_name].nil?
value = LiteralInput.coerce(arg_defn.type, arg_defn.default_value, variables)
- hash[arg_name] = value unless value.nil?
+ if !value.nil?
+ hash[arg_name] = value
+ end
end
end
Arguments.new(hash)
end
end