I’ve noticed that using pagination with the sortBy parameter causes duplicate records to be sent as the offset parameter is modified. The below format seems to work great:
Our QA verifies a bug here, so I created an internal ticket to fix the issue. Thank you for helping us to get better!
We will notify you when it will be fixed.
The reason for this behavior is that the database does not guarantee a specific output order for rows with identical values in the sorted columns. Therefore, the same record(s) may appear in different order in these queries.
There are several ways to address this and achieve predictable behavior:
In your table, go to Schema → Constraints → Select constraints, and set ‘Indexed’ for the column you are sorting by. By the way, we always recommend setting an index for sorting.
When sending a query with sorting, additionally specify sorting by the ‘objectId’ along with the specified column.