Sha256: 445da093d90ce04deb445019a57bad2d211e12f737b7b1798431172a8a87ee2f

Contents?: true

Size: 971 Bytes

Versions: 47

Compression:

Stored size: 971 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Types
    module Relay
      module PageInfoBehaviors
        def self.included(child_class)
          child_class.extend ClassMethods
          child_class.description "Information about pagination in a connection."
          child_class.field :has_next_page, Boolean, null: false,
            description: "When paginating forwards, are there more items?"

          child_class.field :has_previous_page, Boolean, null: false,
            description: "When paginating backwards, are there more items?"

          child_class.field :start_cursor, String, null: true,
            description: "When paginating backwards, the cursor to continue."

          child_class.field :end_cursor, String, null: true,
            description: "When paginating forwards, the cursor to continue."
        end
      end

      module ClassMethods
        def default_relay?
          true
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
graphql-2.2.16 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.1.13 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.7 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.6 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.5 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.0.31 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.2 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.1 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.0 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.14 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.13 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.12 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.0.29 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.1.12 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.11 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.10 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.9 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.8 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.7 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.2.6 lib/graphql/types/relay/page_info_behaviors.rb