Maotora
02/07/2022, 3:19 PMTag {
contents Content[]
name String @unique
}
Would need to order tag which has most content first.Maotora
02/07/2022, 7:24 PMconst popularTags = await prisma.tag.findMany({
orderBy: {
contents: {
count: 'desc',
},
},
})