Fergal Moran
09/29/2022, 7:02 PMconst items = await prisma.items.findMany({
take: 12, orderBy: { title: 'asc' },
include: {
_count: {
select: {
votes: { where: { isUp: true } },
votes: { where: { isUp: false } }, // ???
}
}
}
});
like, I would like the two votes fields to be "upVotes" and "downVotes"?
Thanks for any help!Fergal Moran
09/30/2022, 1:36 PM