PaginationInterface
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.
interface PaginationInterface {
current_page: Int!
per_page: Int!
total_entries: Int!
total_pages: Int!
}
Fields
PaginationInterface.current_page
● Int!
non-null scalar
The number of the page currently being returned in this query
PaginationInterface.per_page
● Int!
non-null scalar
The number of items per page currently being returned in this query
PaginationInterface.total_entries
● Int!
non-null scalar
The total number of items in the paginated list (across all pages)
PaginationInterface.total_pages
● Int!
non-null scalar
The total number of pages in the paginated list
Implemented By
ConventionsPagination
object ● CouponsPagination
object ● EmailRoutesPagination
object ● EventProposalsPagination
object ● EventsPagination
object ● OrdersPagination
object ● RankedChoiceDecisionsPagination
object ● RunsPagination
object ● SignupChangesPagination
object ● SignupRequestsPagination
object ● SignupsPagination
object ● UserConProfilesPagination
object ● UsersPagination
object