Standardize paginated queries
This is the approach we currently take with CommonsPub, it would be good if we could standardise to use compatible queries between apps
Query:
intentsPages(limit: Int, before: [Cursor!], after: [Cursor!]): IntentsPage!
Return Type:
type IntentsPage { edges: [Intent!]! pageInfo: PageInfo! totalCount: Int! }
PageInfo type:
type PageInfo { endCursor: [Cursor!] hasNextPage: Boolean hasPreviousPage: Boolean startCursor: [Cursor!] }
Cursor
is a scalar defined as an opaque position marker for pagination. Paginated queries return a PageInfo struct with start and end cursors (which are actually lists of Cursor). You can then issue queries requesting results before the start or after the end cursors to request the previous or next page respectively.
It's actually a string or integer. May be extended in future.