Sha256: 0e1753defb7680ffc207cbf54a1b8f9fb26c4cfe4513160e73111c75f67ff48a
Contents?: true
Size: 356 Bytes
Versions: 16
Compression:
Stored size: 356 Bytes
Contents
module GraphQL module Relay class GlobalIdResolve def initialize(type_name:, property:) @property = property @type_name = type_name end def call(obj, args, ctx) id_value = obj.public_send(@property) ctx.query.schema.node_identification.to_global_id(@type_name, id_value) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems