Sha256: c0efa63177b01763b98a51691ccfa1de51a25c30ee77dfcbc05b23e6b614ba69
Contents?: true
Size: 435 Bytes
Versions: 116
Compression:
Stored size: 435 Bytes
Contents
# frozen_string_literal: true module GraphQL module Relay class GlobalIdResolve def initialize(type:) @type = type end def call(obj, args, 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
Version data entries
116 entries across 116 versions & 2 rubygems