Get the count of a nested relation in findMany()

Is it currently possible to get the count of a nested relation in findMany() query?
const data = await db.query.docs.findMany({
with: {
articles: {
with: { attachments: { count: "Count of attachments here" } }
}
}
});
const data = await db.query.docs.findMany({
with: {
articles: {
with: { attachments: { count: "Count of attachments here" } }
}
}
});
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server