Sha256: 3a923e412f2a5df554227e9a91e4c27bd889249813491e02778deabb2308c5ea
Contents?: true
Size: 624 Bytes
Versions: 70
Compression:
Stored size: 624 Bytes
Contents
# frozen_string_literal: true module GraphQL module Types module Relay module NodeBehaviors def self.included(child_module) child_module.extend(ClassMethods) child_module.description("An object with an ID.") child_module.field(:id, ID, null: false, description: "ID of the object.", resolver_method: :default_global_id) end def default_global_id context.schema.id_from_object(object, self.class, context) end module ClassMethods def default_relay? true end end end end end end
Version data entries
70 entries across 70 versions & 1 rubygems