relay-cursor-paging
Relay Cursor-Based Pagination Support for Databases
API:
getPagingParameters(args): Emits an object with limit
and criteria
fields based on Relay's pagination fields (e.g. first
, after
, last
, and before
).
pageable(argSpec): Emits an augmented Argument Specification with first
, after
, before
, and last
arguments.
;const connectionFromPromisedArraySlice = ; const myType = { relatedThings: type: thingConnection args: // Adds first, after, last, and before arguments { const limit offset = ; const criteria = ; return ; } };