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:
parent
a9aeab12a3
commit
2ee48250da
1 changed files with 1 additions and 0 deletions
|
@ -318,6 +318,7 @@ function useSearchResults(
|
||||||
currentUserOwnsOrWants: $currentUserOwnsOrWants
|
currentUserOwnsOrWants: $currentUserOwnsOrWants
|
||||||
zoneIds: $zoneIds
|
zoneIds: $zoneIds
|
||||||
) {
|
) {
|
||||||
|
id
|
||||||
numTotalItems
|
numTotalItems
|
||||||
items(offset: $offset, limit: $perPage) {
|
items(offset: $offset, limit: $perPage) {
|
||||||
# TODO: De-dupe this from useOutfitState?
|
# TODO: De-dupe this from useOutfitState?
|
||||||
|
|
Loading…
Reference in a new issue