lib/graphql/language/nodes.rb in graphql-1.7.8 vs lib/graphql/language/nodes.rb in graphql-1.7.9
- old
+ new
@@ -286,16 +286,19 @@
end
private
def serialize_value_for_hash(value)
- if value.is_a? InputObject
+ case value
+ when InputObject
value.to_h
- elsif value.is_a? Array
+ when Array
value.map do |v|
serialize_value_for_hash v
end
- elsif value.is_a? NullValue
+ when Enum
+ value.name
+ when NullValue
nil
else
value
end
end