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 to query_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 GTVs

  • next_cursor: a base64 encoded page_cursor that can be passed as page_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.

Properties

Link copied to clipboard
val data: list<gtv>

list of GTV-encoded entries, of the return type expected from the query

Link copied to clipboard

base64-encoded page_cursor, that can be passed back to the query to retrieve the next page