Closed ghost closed 2 years ago
Right now, we query a user's entire lists, then sort them on the backend before returning to the frontend the latest 5 entries.
Instead, we should query no more than 5 entries in the first place.
I didn't do this to begin with because it involves using two indexes (filter by user, and sort by update date), which seemed a little complicated in Fauna: https://stackoverflow.com/questions/61509089/how-to-query-by-multiple-conditions-in-faunadb
But I'll do it now.
Sounds good to me!
60c22b8
Right now, we query a user's entire lists, then sort them on the backend before returning to the frontend the latest 5 entries.
Instead, we should query no more than 5 entries in the first place.
I didn't do this to begin with because it involves using two indexes (filter by user, and sort by update date), which seemed a little complicated in Fauna: https://stackoverflow.com/questions/61509089/how-to-query-by-multiple-conditions-in-faunadb
But I'll do it now.