Set.paginate()
Get the next or previous page of Set values that correspond to a previously acquired pagination token.
Signature
Set.paginate(cursor: String): Page<any>
Set.paginate(cursor: String, count: Number): Page<any>
Description
Set.paginate()
gets the next or previous page of Set values that
correspond to a previously acquired pagination token. Pagination tokens
are provided when a Set is the last value in a query.
The page size can be set with the paginate()
call, or accept
the default number of paginated values: 16.
Return value
Type | Description |
---|---|
Page |
An object with: - |
Examples
-
The page includes a pagination cursor:
{ data: [ { letter: "A" }, { letter: "B" }, { letter: "C" }, ... elided ... { letter: "U" }, { letter: "V" }, { letter: "W" } ], after: "hs+DzoPOg ... aY1hOohozrV7A" }
-
Use the cursor to access the next page:
{ data: [ { letter: "X" }, { letter: "Y" }, { letter: "Z" } ] }
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!