Module: GraphQL::Relay

Defined in:
lib/graphql/relay/edge.rb,
lib/graphql/relay/define.rb,
lib/graphql/relay/version.rb,
lib/graphql/relay/mutation.rb,
lib/graphql/relay/edge_type.rb,
lib/graphql/relay/page_info.rb,
lib/graphql/relay/range_add.rb,
lib/graphql/relay/base_connection.rb,
lib/graphql/relay/connection_type.rb,
lib/graphql/relay/global_id_field.rb,
lib/graphql/relay/array_connection.rb,
lib/graphql/relay/connection_field.rb,
lib/graphql/relay/relation_connection.rb,
lib/graphql/relay/global_node_identification.rb

Defined Under Namespace

Modules: ConnectionType, Define, EdgeType, RangeAdd Classes: ArrayConnection, BaseConnection, ConnectionField, Edge, GlobalIdField, GlobalNodeIdentification, Mutation, RelationConnection

Constant Summary collapse

VERSION =
"0.12.0"
PageInfo =

Wrap a Connection and expose its page info

GraphQL::ObjectType.define do
  name("PageInfo")
  description("Metadata about 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