Sha256: ab0e29c8f26db13ead6741d8e5afdd54e56b86196c3b82ac77ba30ee0e2c5013

Contents?: true

Size: 763 Bytes

Versions: 47

Compression:

Stored size: 763 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Relay
    # Wrap a Connection and expose its page info
    PageInfo = GraphQL::ObjectType.define do
      name("PageInfo")
      description("Information about pagination in a connection.")
      field :hasNextPage, !types.Boolean, "When paginating forwards, are there more items?", property: :has_next_page
      field :hasPreviousPage, !types.Boolean, "When paginating backwards, are there more items?", property: :has_previous_page
      field :startCursor, types.String, "When paginating backwards, the cursor to continue.", property: :start_cursor
      field :endCursor, types.String, "When paginating forwards, the cursor to continue.", property: :end_cursor
      default_relay true
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
graphql-1.5.14 lib/graphql/relay/page_info.rb
graphql-1.5.13 lib/graphql/relay/page_info.rb
graphql-1.5.12 lib/graphql/relay/page_info.rb
graphql-1.5.11 lib/graphql/relay/page_info.rb
graphql-1.5.10 lib/graphql/relay/page_info.rb
graphql-1.5.9 lib/graphql/relay/page_info.rb
graphql-1.5.8 lib/graphql/relay/page_info.rb