Skip to main content

ConventionsPagination

No description

type ConventionsPagination implements PaginationInterface {
current_page: Int!
entries: [Convention!]!
per_page: Int!
total_entries: Int!
total_pages: Int!
}

Fields

ConventionsPagination.current_page ● Int! non-null scalar

The number of the page currently being returned in this query

ConventionsPagination.entries ● [Convention!]! non-null object

ConventionsPagination.per_page ● Int! non-null scalar

The number of items per page currently being returned in this query

ConventionsPagination.total_entries ● Int! non-null scalar

The total number of items in the paginated list (across all pages)

ConventionsPagination.total_pages ● Int! non-null scalar

The total number of pages in the paginated list

Interfaces

PaginationInterface interface

PaginationInterface provides a way to use offset-based pagination on a list of objects. This is useful for UIs such as Intercode's table views, which provide a way to jump between numbered pages.

Page numbers in PaginationInterface are 1-based (so, the first page is page 1, then page 2, etc.) The number of items per page can be controlled via the per_page argument on paginated fields. It defaults to 20, and can go up to 200.

Offset-based pagination is different from Relay's cursor-based pagination that is more commonly used in GraphQL APIs. We chose to go with an offset-based approach due to our UI needs, but if a cursor-based approach is desirable in the future, we may also implement Relay connections alongside our existing pagination fields.

Returned By

conventions_paginated query