mberger-
mberger-•2w ago

combine list query results in one

I have conversations that are linked to an account:
conversations: defineTable({
account_id: v.id("connected_accounts"),
name: v.string(),
...
})
conversations: defineTable({
account_id: v.id("connected_accounts"),
name: v.string(),
...
})
and a paginated query to list all conversations of an account. But I also want to be able to see predefined groups of accounts at the same time. Is there an optimized way to view the combined conversations of multiple accounts in one paginated query. (ex: having a query that combine the conversations of account A and B ordered by time) - without making n times more queries to return one single page.
3 Replies
Convex Bot
Convex Bot•2w ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart•2w ago
Merging Streams of Convex data
New convex-helpers are available now for fetching streams of documents, merging them together, filtering them them out, and paginating the results. Wi...
mberger-
mberger-OP•2w ago
Thanks 😃

Did you find this page helpful?