danielemery / quizlord-api

Graphql api for sharing newspaper quizzes between friends, including results and statistics
https://quizlord.net
MIT License
1 stars 0 forks source link

Sort users by the number of quizzes you have completed with them #60

Closed danielemery closed 11 months ago

danielemery commented 11 months ago

Unfortunately Prisma doesn't support this kind of complex query. I'm a bit wary of shifting complexity into an SQL query like this one. It makes the code quite a bit less approachable.

Another option I've considered is a more eventually consistent approach where a periodic job computes the quizzes completed with each other user and stores it in something like redis. But since we currently have no worker or redis setup I thought that would blow the scope of this work out completely.