paged_result
The return type of all paginated queries. It contains a list of results of the query, and a cursor which can be used to retrieve the next page.
In general, when a paginated query looks like this: get_my_data(page_size: integer?, page_cursor: text?)
page_size
determines the number of results to be returned, defaulting toquery_max_page_size
as defined in the module args if null or higher than that value.page_cursor
determines where the results should start from, defaulting to the first page.
The returned results will be a paged result with:
data
: a list of the expected data, encoded as GTVsnext_cursor
: a base64 encodedpage_cursor
that can be passed aspage_cursor
to the same query to retrieve the next page of data
The cursors are not supposed to be interpreted in any way on the front-end. To avoid unexpected behavior, only pass cursors received from a query to that same query.