RevereCRE / relay-nextjs

⚡️ Relay integration for Next.js apps
https://reverecre.github.io/relay-nextjs/
MIT License
251 stars 30 forks source link

Local cache is not used for "page level" queries #45

Closed FINDarkside closed 2 years ago

FINDarkside commented 2 years ago

Somewhat relevant: https://github.com/RevereCRE/relay-nextjs/issues/41#issuecomment-1034546235

I tried to work around the shallow routing issue by just not using shallow routing. But I've ran into an issue where cache is not used at all when the page level query is ran. It's reproducible in the example app as well, even if you update relay-nextjs to 0.6.0.

FINDarkside commented 2 years ago

Lol my bad, it is in fact using cache, it's just using store-and-network fetch strategy. :man_facepalming:

This is probably something that should be configurable. I'll make a PR if it becomes relevant for us.

rrdelaney commented 2 years ago

Would gladly accept a PR to make that configurable 😄 The reason it's currently set to store-and-network is that's what we found to be the most sensible default in our app.