️ Optimize participant query

This commit is contained in:
Luke Vella 2023-08-26 11:02:54 +01:00
parent bc521f7ecb
commit d5fc45c506
8 changed files with 33 additions and 271 deletions

View file

@ -21,7 +21,12 @@ export const participants = router({
pollId,
},
include: {
votes: true,
votes: {
select: {
optionId: true,
type: true,
},
},
},
orderBy: [
{