Add (optional) fetchPolicy option to RelayOptions. Defaults to store-and-network so the change should be backwards compatible.
What I'd ideally want to do (not in this PR) is that we could use store-and-network on page change and store-or-network when only query params change. Do you think that would be doable? Just asking in case you already know, but I can also think about this later :)
From quick look I'm unsure how I would detect what the previous page was in the function where I need to decide fetch policy. or maybe it would be possible to move the decision to the actual react component. We'll see.
Add (optional)
fetchPolicy
option toRelayOptions
. Defaults tostore-and-network
so the change should be backwards compatible.What I'd ideally want to do (not in this PR) is that we could use
store-and-network
on page change andstore-or-network
when only query params change. Do you think that would be doable? Just asking in case you already know, but I can also think about this later :)From quick look I'm unsure how I would detect what the previous page was in the function where I need to decide fetch policy. or maybe it would be possible to move the decision to the actual react component. We'll see.