lib/graphql/schema/loader.rb in graphql-0.18.15 vs lib/graphql/schema/loader.rb in graphql-0.19.0
- old
+ new
@@ -56,11 +56,11 @@
values: type["enumValues"].map { |enum|
EnumType::EnumValue.new(
name: enum["name"],
description: enum["description"],
deprecation_reason: enum["deprecationReason"],
- value: enum["value"]
+ value: enum["name"]
)
})
when "INTERFACE"
InterfaceType.define(
name: type["name"],
@@ -100,10 +100,10 @@
when "ARGUMENT"
Argument.define(
name: type["name"],
type: type_resolver.call(type["type"]),
description: type["description"],
- default_value: type["defaultValue"]
+ default_value: type["defaultValue"] ? JSON.parse(type["defaultValue"], quirks_mode: true) : nil
)
when "SCALAR"
case type.fetch("name")
when "Int"
INT_TYPE