Sha256: 7075991487ac5b02630daacf89edf0028375d9b045474907a1a810b7d222c594

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 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, "Indicates if there are more pages to fetch", property: :has_next_page
      field :hasPreviousPage, !types.Boolean, "Indicates if there are any pages prior to the current page", 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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graphql-1.3.0 lib/graphql/relay/page_info.rb