Fix caching for search result pages

Apollo Client is pretty darn reliant on an `id` field for effective caching, more often than you'd think!

Before this change, navigating back to a page you'd already loaded would cause it to reload. After this change, it no longer does, and serves the page from cache instead!
This commit is contained in:
Emi Matchu 2022-10-14 19:38:26 -07:00
parent a9aeab12a3
commit 2ee48250da

View file

@ -318,6 +318,7 @@ function useSearchResults(
currentUserOwnsOrWants: $currentUserOwnsOrWants
zoneIds: $zoneIds
) {
id
numTotalItems
items(offset: $offset, limit: $perPage) {
# TODO: De-dupe this from useOutfitState?