facebook / facebook/relay

preloadQuery fetchKey in conjunction with fetchPolicy='network-only'

Open
#3,059 1 comment 1 reaction 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Reading the documentation of Relay Experimental preloadQuery, I found:

> **fetchKey**: A fetchKey can be passed to force a refetch of the query and variables. preloadQuery() will cache requests while they are in-flight and for a brief duration afterwards, but using a distinct fetchKey can ensure that data is refetched (generally when used in conjunction with fetchPolicy=network-only).

Well, for me is not make sense that I need to configure fetchKey in conjunction with fetchPolicy 'network-only'.
The "fetchPolicy=network-only" parameter doesn't means I want data from server?
Why do I need configure a distinct fetchKey together?

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.