facebook / facebook/relay

V11 fetchPolicy are ignored on useLazyLoadQuery no request fired always cached data used...

Open
#3,395 17 comments 15 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

**Behaviour**

On new **V11** the behavior of `fetchPolicy` is different compared to prev. relay experimental mode... Looks like it always used cached data...

For example with policy `fetchPolicy: "store-and-network"` or `fetchPolicy: "network-only"` data gets loaded from cache and **no network request is fired** and that is compared to experimental mode wrong...

tested with `useLazyLoadQuery`

```
const data = useLazyLoadQuery(
AssignedDetailUserEventsQueryTag,
{
gql_id: initialAssignedId,
},
{
fetchPolicy: "network-only"
}
);
```
**More info:**
- There is no network layer cache (only Relay store cache) !
- Working with experimental : `0.0.0-experimental-4c4107dd` ( last half year I had no problems with any version)

**Versions**

Relay 11.0.0
React": "0.0.0-experimental-8af27aeed",

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.