Pagination
Opened this issue · 0 comments
ronkorving commented
We already use the query string for searches, so we might as well expose pagination (useful for large collections that have a paginated web UI in front of them).
Properties in the query string:
{
"pageNum": 1,
"pageAfter": "some ID",
"pageSize": 10
}
You would browse using either pageNum
or pageAfter
. The former is more common, but the latter ensures no gaps exist between 2 pages while mutations happen. It does mean that after deletion of the resource pageAfter
points to, it may not be able to paginate at all (404).
To enable this, we still need to first make getList() return a predictably-sorted array of resources.