diff --git a/website/docs/api-reference/hooks/use-lazy-load-query.md b/website/docs/api-reference/hooks/use-lazy-load-query.md index ba7c0fe4b6f82..364e5cba9eaf1 100644 --- a/website/docs/api-reference/hooks/use-lazy-load-query.md +++ b/website/docs/api-reference/hooks/use-lazy-load-query.md @@ -48,7 +48,7 @@ function App() { * "store-or-network": _*(default)*_ *will* reuse locally cached data and will *only* send a network request if any data for the query is missing. If the query is fully cached, a network request will *not* be made. * "store-and-network": *will* reuse locally cached data and will *always* send a network request, regardless of whether any data was missing from the local cache or not. * "network-only": *will* *not* reuse locally cached data, and will *always* send a network request to fetch the query, ignoring any data that might be locally cached in Relay. - * "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](../../guided-tour/updating-data/local-data-updates). + * "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](../../guided-tour/updating-data/local-data-updates). * `fetchKey`: A `fetchKey` can be passed to force a re-evaluation of the current query and variables when the component re-renders, even if the variables didn't change, or even if the component isn't remounted (similarly to how passing a different `key` to a React component will cause it to remount). If the `fetchKey` is different from the one used in the previous render, the current query will be re-evaluated against the store, and it might be refetched depending on the current `fetchPolicy` and the state of the cache. * `networkCacheConfig`: *_[Optional] _* Default value: `{force: true}`. Object containing cache config options for the *network layer*. Note that the network layer may contain an *additional* query response cache which will reuse network responses for identical queries. If you want to bypass this cache completely (which is the default behavior), pass `{force: true}` as the value for this option. diff --git a/website/docs/guided-tour/reusing-cached-data/fetch-policies.md b/website/docs/guided-tour/reusing-cached-data/fetch-policies.md index 43b56031fa68f..442a18a1990f6 100644 --- a/website/docs/guided-tour/reusing-cached-data/fetch-policies.md +++ b/website/docs/guided-tour/reusing-cached-data/fetch-policies.md @@ -47,7 +47,7 @@ Specifically, `fetchPolicy` can be any of the following options: ** * "store-or-network": *(default)* *will* reuse locally cached data, and will *only* send a network request if any data for the query is [missing](../presence-of-data/) or [stale](../staleness-of-data/). If the query is fully cached, a network request will *not* be made. * "store-and-network": *will* reuse locally cached data and will *always* send a network request, regardless of whether any data was [missing](../presence-of-data/) or [stale](../staleness-of-data/) in the store. * "network-only": *will* *not* reuse locally cached data, and will *always* send a network request to fetch the query, ignoring any data that might be locally cached and whether it's [missing](../presence-of-data/) or [stale](../staleness-of-data/). -* "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](../../updating-data/local-data-updates/). +* "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](../../updating-data/local-data-updates/). Note that the `refetch` function discussed in the [Fetching and Rendering Different Data](../../refetching/) section also takes a `fetchPolicy`. diff --git a/website/versioned_docs/version-experimental/RelayHooks-ApiReference.md b/website/versioned_docs/version-experimental/RelayHooks-ApiReference.md index 594f0d22f7021..9ee78ed14f0bc 100644 --- a/website/versioned_docs/version-experimental/RelayHooks-ApiReference.md +++ b/website/versioned_docs/version-experimental/RelayHooks-ApiReference.md @@ -277,7 +277,7 @@ function App() { - **"store-or-network"**: __(default)__ **_will_** reuse locally cached data and will **_only_** send a network request if any data for the query is missing. If the query is fully cached, a network request will **_not_** be made. - **"store-and-network"**: **_will_** reuse locally cached data and will **_always_** send a network request, regardless of whether any data was missing from the local cache or not. - **"network-only"**: **_will not_** reuse locally cached data, and will **_always_** send a network request to fetch the query, ignoring any data that might be locally cached in Relay. - - **"store-only"**: **_will only_** reuse locally cached data, and will **_never_** send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](a-guided-tour-of-relay#local-data-updates). + - **"store-only"**: **_will only_** reuse locally cached data, and will **_never_** send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](a-guided-tour-of-relay#local-data-updates). - `fetchKey`: A `fetchKey` can be passed to force a refetch of the current query and variables when the component re-renders, even if the variables didn't change, or even if the component isn't remounted (similarly to how passing a different `key` to a React component will cause it to remount). If the fetchKey is different from the one used in the previous render, the current query and variables will be refetched. - `networkCacheConfig`: __[Optional]__ Object containing cache config options for the **_network layer._** Note the the network layer may contain an _additional_ query response cache which will reuse network responses for identical queries. If you want to bypass this cache completely, pass `{force: true}` as the value for this option. diff --git a/website/versioned_docs/version-v11.0.0/api-reference/hooks/use-lazy-load-query.md b/website/versioned_docs/version-v11.0.0/api-reference/hooks/use-lazy-load-query.md index 1e06bdd55d516..e2ef14968df6b 100644 --- a/website/versioned_docs/version-v11.0.0/api-reference/hooks/use-lazy-load-query.md +++ b/website/versioned_docs/version-v11.0.0/api-reference/hooks/use-lazy-load-query.md @@ -43,7 +43,7 @@ function App() { * "store-or-network": _*(default)*_ *will* reuse locally cached data and will *only* send a network request if any data for the query is missing. If the query is fully cached, a network request will *not* be made. * "store-and-network": *will* reuse locally cached data and will *always* send a network request, regardless of whether any data was missing from the local cache or not. * "network-only": *will* *not* reuse locally cached data, and will *always* send a network request to fetch the query, ignoring any data that might be locally cached in Relay. - * "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](../../guided-tour/updating-data/local-data-updates). + * "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](../../guided-tour/updating-data/local-data-updates). * `fetchKey`: A `fetchKey` can be passed to force a re-evaluation of the current query and variables when the component re-renders, even if the variables didn't change, or even if the component isn't remounted (similarly to how passing a different `key` to a React component will cause it to remount). If the `fetchKey` is different from the one used in the previous render, the current query will be re-evaluated against the store, and it might be refetched depending on the current `fetchPolicy` and the state of the cache. * `networkCacheConfig`: *_[Optional] _* Default value: `{force: true}`. Object containing cache config options for the *network layer*. Note that the network layer may contain an *additional* query response cache which will reuse network responses for identical queries. If you want to bypass this cache completely (which is the default behavior), pass `{force: true}` as the value for this option. diff --git a/website/versioned_docs/version-v11.0.0/guided-tour/reusing-cached-data/fetch-policies.md b/website/versioned_docs/version-v11.0.0/guided-tour/reusing-cached-data/fetch-policies.md index 0c9bda7db8259..e125f3aaf3456 100644 --- a/website/versioned_docs/version-v11.0.0/guided-tour/reusing-cached-data/fetch-policies.md +++ b/website/versioned_docs/version-v11.0.0/guided-tour/reusing-cached-data/fetch-policies.md @@ -40,7 +40,7 @@ Specifically, `fetchPolicy` can be any of the following options: ** * "store-or-network": *(default)* *will* reuse locally cached data, and will *only* send a network request if any data for the query is [missing](../presence-of-data/) or [stale](../staleness-of-data/). If the query is fully cached, a network request will *not* be made. * "store-and-network": *will* reuse locally cached data and will *always* send a network request, regardless of whether any data was [missing](../presence-of-data/) or [stale](../staleness-of-data/) in the store. * "network-only": *will* *not* reuse locally cached data, and will *always* send a network request to fetch the query, ignoring any data that might be locally cached and whether it's [missing](../presence-of-data/) or [stale](../staleness-of-data/). -* "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](../../updating-data/local-data-updates/). +* "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](../../updating-data/local-data-updates/). Note that the `refetch` function discussed in the [Fetching and Rendering Different Data](../../refetching/) section also takes a `fetchPolicy`. diff --git a/website/versioned_docs/version-v12.0.0/api-reference/hooks/use-lazy-load-query.md b/website/versioned_docs/version-v12.0.0/api-reference/hooks/use-lazy-load-query.md index ba7c0fe4b6f82..364e5cba9eaf1 100644 --- a/website/versioned_docs/version-v12.0.0/api-reference/hooks/use-lazy-load-query.md +++ b/website/versioned_docs/version-v12.0.0/api-reference/hooks/use-lazy-load-query.md @@ -48,7 +48,7 @@ function App() { * "store-or-network": _*(default)*_ *will* reuse locally cached data and will *only* send a network request if any data for the query is missing. If the query is fully cached, a network request will *not* be made. * "store-and-network": *will* reuse locally cached data and will *always* send a network request, regardless of whether any data was missing from the local cache or not. * "network-only": *will* *not* reuse locally cached data, and will *always* send a network request to fetch the query, ignoring any data that might be locally cached in Relay. - * "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](../../guided-tour/updating-data/local-data-updates). + * "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](../../guided-tour/updating-data/local-data-updates). * `fetchKey`: A `fetchKey` can be passed to force a re-evaluation of the current query and variables when the component re-renders, even if the variables didn't change, or even if the component isn't remounted (similarly to how passing a different `key` to a React component will cause it to remount). If the `fetchKey` is different from the one used in the previous render, the current query will be re-evaluated against the store, and it might be refetched depending on the current `fetchPolicy` and the state of the cache. * `networkCacheConfig`: *_[Optional] _* Default value: `{force: true}`. Object containing cache config options for the *network layer*. Note that the network layer may contain an *additional* query response cache which will reuse network responses for identical queries. If you want to bypass this cache completely (which is the default behavior), pass `{force: true}` as the value for this option. diff --git a/website/versioned_docs/version-v12.0.0/guided-tour/reusing-cached-data/fetch-policies.md b/website/versioned_docs/version-v12.0.0/guided-tour/reusing-cached-data/fetch-policies.md index 43b56031fa68f..442a18a1990f6 100644 --- a/website/versioned_docs/version-v12.0.0/guided-tour/reusing-cached-data/fetch-policies.md +++ b/website/versioned_docs/version-v12.0.0/guided-tour/reusing-cached-data/fetch-policies.md @@ -47,7 +47,7 @@ Specifically, `fetchPolicy` can be any of the following options: ** * "store-or-network": *(default)* *will* reuse locally cached data, and will *only* send a network request if any data for the query is [missing](../presence-of-data/) or [stale](../staleness-of-data/). If the query is fully cached, a network request will *not* be made. * "store-and-network": *will* reuse locally cached data and will *always* send a network request, regardless of whether any data was [missing](../presence-of-data/) or [stale](../staleness-of-data/) in the store. * "network-only": *will* *not* reuse locally cached data, and will *always* send a network request to fetch the query, ignoring any data that might be locally cached and whether it's [missing](../presence-of-data/) or [stale](../staleness-of-data/). -* "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate and data that is entirely [local](../../updating-data/local-data-updates/). +* "store-only": *will* *only* reuse locally cached data, and will *never* send a network request to fetch the query. In this case, the responsibility of fetching the query falls to the caller, but this policy could also be used to read and operate on data that is entirely [local](../../updating-data/local-data-updates/). Note that the `refetch` function discussed in the [Fetching and Rendering Different Data](../../refetching/) section also takes a `fetchPolicy`.