Module: GraphQL::Relay

Defined in:
lib/graphql/relay/edge.rb,
lib/graphql/relay/node.rb,
lib/graphql/relay/mutation.rb,
lib/graphql/relay/edge_type.rb,
lib/graphql/relay/page_info.rb,
lib/graphql/relay/base_connection.rb,
lib/graphql/relay/connection_type.rb,
lib/graphql/relay/array_connection.rb,
lib/graphql/relay/connection_field.rb,
lib/graphql/relay/global_id_resolve.rb,
lib/graphql/relay/connection_resolve.rb,
lib/graphql/relay/relation_connection.rb

Defined Under Namespace

Modules: ConnectionType, EdgeType, Node Classes: ArrayConnection, BaseConnection, ConnectionField, ConnectionResolve, Edge, GlobalIdResolve, Mutation, RelationConnection

Constant Summary collapse

PageInfo =

Wrap a Connection and expose its page info

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