Sha256: c8394d4f077c4a93298d0596fa97a09c5586b6d1c5d9fad6bf77f953f549895e

Contents?: true

Size: 492 Bytes

Versions: 32

Compression:

Stored size: 492 Bytes

Contents

module GraphQL
  module Relay
    # Mostly an internal concern.
    #
    # Wraps an object as a `node`, and exposes a connection-specific `cursor`.
    class Edge < GraphQL::ObjectType
      attr_reader :node, :connection
      def initialize(node, connection)
        @node = node
        @connection = connection
      end

      def cursor
        @cursor ||= connection.cursor_from_node(node)
      end

      def parent
        @parent ||= connection.parent
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
graphql-1.2.6 lib/graphql/relay/edge.rb
graphql-1.2.5 lib/graphql/relay/edge.rb
graphql-1.2.4 lib/graphql/relay/edge.rb
graphql-1.2.3 lib/graphql/relay/edge.rb
graphql-1.2.2 lib/graphql/relay/edge.rb
graphql-1.2.1 lib/graphql/relay/edge.rb
graphql-1.2.0 lib/graphql/relay/edge.rb
graphql-1.1.0 lib/graphql/relay/edge.rb
graphql-1.0.0 lib/graphql/relay/edge.rb
graphql-0.19.4 lib/graphql/relay/edge.rb
graphql-0.19.3 lib/graphql/relay/edge.rb
graphql-0.19.2 lib/graphql/relay/edge.rb
graphql-0.19.1 lib/graphql/relay/edge.rb
graphql-0.19.0 lib/graphql/relay/edge.rb
graphql-0.18.15 lib/graphql/relay/edge.rb
graphql-0.18.14 lib/graphql/relay/edge.rb
graphql-0.18.13 lib/graphql/relay/edge.rb
graphql-0.18.12 lib/graphql/relay/edge.rb
graphql-0.18.11 lib/graphql/relay/edge.rb
graphql-0.18.10 lib/graphql/relay/edge.rb