DevStronauTD
Convex Community2y ago
15 replies
DevStronauT

Query documents by array of documentIds possible?

Is there any way to get the documents by array of documentIds?

here I'm querying my documentIds in array!

const collaborators = await ctx.db .query("collaborators") .withIndex("by_email", (q) => q.eq("email", args.email)) .collect(); const documentIds = collaborators.map(collaborator => collaborator.document);

Now I want to query all the documents whose _id presents in documentIds array!
Was this page helpful?