Sha256: fec375bb3dcd03aa05863cbda21405f7e56bf9c79635eb4fbc6de1cf621192c4

Contents?: true

Size: 1.01 KB

Versions: 30

Compression:

Stored size: 1.01 KB

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

        def default_broadcastable?
          true
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
graphql-2.4.14 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.22 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.21 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.13 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.12 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.11 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.10 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.9 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.8 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.7 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.6 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.5 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.4 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.3 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.2 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.1 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.4.0 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.20 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.19 lib/graphql/types/relay/page_info_behaviors.rb
graphql-2.3.18 lib/graphql/types/relay/page_info_behaviors.rb