lib/graphql/relay/global_id_resolve.rb in graphql-1.7.14 vs lib/graphql/relay/global_id_resolve.rb in graphql-1.8.0.pre1

- old
+ new

@@ -5,10 +5,14 @@ def initialize(type:) @type = type end def call(obj, args, ctx) - ctx.query.schema.id_from_object(obj, @type, ctx) + if obj.is_a?(GraphQL::Schema::Object) + obj = obj.object + end + type = @type.respond_to?(:graphql_definition) ? @type.graphql_definition : @type + ctx.query.schema.id_from_object(obj, type, ctx) end end end end