Feat: store-or-network in Relay Modern stable
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Relay experimental has the option to use `store-or-network` as it's fetch policy (which only fetches if the data is not in the store)
However, relay v9 only has a `store-and-network` that will always refetch the data regardless of if it's in the store.
Would it be possible to bring the `store-or-network` option into the stable releases of Relay Modern?
The alternative options the currently exist don't appear to be a suitable replacement for `store-or-network`.
[relay-query-lookup-renderer](https://github.com/relay-tools/relay-query-lookup-renderer) doesn't cache in-progress promises resulting in [duplicate network requests](https://github.com/relay-tools/relay-query-lookup-renderer/issues/26) for the same data.
[ReactRelayLocalQueryRenderer](https://github.com/facebook/relay/blob/master/packages/react-relay/ReactRelayLocalQueryRenderer.js) won't do a network request if the data is not found.
Contributor guide
Assessment
This issue has not been assessed yet.