Dima UtkinD
Convex Communityβ€’3y agoβ€’
10 replies
Dima Utkin

pagination filtering

The solution to these issues (for us, users), imho, is adding an optional extra filtering ability to the
paginate
function, so we can do smth like this:
const response = await db.query('messages').paginate(
  paginationOpts,
  {
    continueWhile: (message) => message.body.includes('fff'),
  }
)


In this case, we'll end up with a correct cursor on the client, and mostly stable page size.
Maybe it would be very much like the same second option, but done by Convex internally, i'm not sure πŸ€·β€β™‚οΈ

wdyt?
Was this page helpful?