Sha256: 7520d748f163bc628fa72a785f12d944c801b01717d4bcbf928c73441dcd99e0

Contents?: true

Size: 539 Bytes

Versions: 15

Compression:

Stored size: 539 Bytes

Contents

# frozen_string_literal: true

module GraphQL
  module Types
    module Relay
      # This can be used for Relay's `Node` interface,
      # or you can take it as inspiration for your own implementation
      # of the `Node` interface.
      module Node
        include Types::Relay::BaseInterface
        default_relay(true)
        description "An object with an ID."
        field(:id, ID, null: false, description: "ID of the object.")
        # TODO Should I implement `id` here to call the schema's hook?
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
graphql-1.8.18 lib/graphql/types/relay/node.rb
graphql-1.8.17 lib/graphql/types/relay/node.rb
graphql-1.8.16 lib/graphql/types/relay/node.rb
graphql-1.8.15 lib/graphql/types/relay/node.rb
graphql-1.8.14 lib/graphql/types/relay/node.rb
graphql-1.8.13 lib/graphql/types/relay/node.rb
graphql-1.8.12 lib/graphql/types/relay/node.rb
graphql-1.8.11 lib/graphql/types/relay/node.rb
graphql-1.8.10 lib/graphql/types/relay/node.rb
graphql-1.8.9 lib/graphql/types/relay/node.rb
graphql-1.8.8 lib/graphql/types/relay/node.rb
graphql-1.8.7 lib/graphql/types/relay/node.rb
graphql-1.8.6 lib/graphql/types/relay/node.rb
graphql-1.8.5 lib/graphql/types/relay/node.rb
graphql-1.8.4 lib/graphql/types/relay/node.rb