zidZ
Convex Community2y ago
2 replies
zid

multiple pagination queries in a single function

i imagine this to be uncommon scenario, but came across a situation where having the ability to setup 2 pagination queries inside a single function wouldve been great.

my scenario is that i have 2 tables, threads and comments, where they each have a status property that can hold the following values hidden and visible.

What id like to be able to do is fetch all the hidden threads and comments, and return a single list [...threads, ...comments].

Another way to handle this is to create a dedicated table hiddenPosts for example, but feels like more of a workaround.

Currently, I'm using two separate pagination queries, then using a useEffect to concatenate/spread them into a single result using local state.

Curious if this will ever be supported?
Was this page helpful?