···11+---
22+'@urql/exchange-persisted-fetch': minor
33+---
44+55+Add `enforcePersistedQueries` option to `persistedFetchExchange`, which disables automatic persisted queries and retry logic, and instead assumes that persisted queries will be handled like normal GraphQL requests.
+5
docs/advanced/persistence-and-uploads.md
···107107});
108108```
109109110110+Additionally, if the API only expects persisted queries and not arbitrary ones and all queries are
111111+pre-registered against the API then the `persistedFetchExchange` may be put into a **non-automatic**
112112+persisted queries mode by giving it the `enforcePersistedQueries: true` option. This disables any
113113+retry logic and assumes that persisted queries will be handled like regular GraphQL requests.
114114+110115[Read more about `@urql/persisted-fetch-exchange` in our API
111116docs.](../api/persisted-fetch-exchange.md)
112117
+1
docs/api/persisted-fetch-exchange.md
···6363| Option | Description |
6464| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
6565| `preferGetForPersistedQueries` | This is similar to [the `Client`'s `preferGetMethod` option](./core.md#client) and will cause all persisted queries to be sent using a GET request. |
6666+| `enforcePersistedQueries` | This option enforced persisted queries. Instead of allowing automatic persisted queries or triggering any retry logic when the API responds, it instead assumes that persisted queries will succeed and run like normal GraphQL API requests. |
6667| `generateHash` | This option accepts a function that receives the `query` as a string and the raw `DocumentNode` as a second argument and must return a `Promise<string>` resolving to a SHA256 hash. This can be used to swap out the SHA256 API, e.g. for React Native, or to use pre-generated SHA256 strings from the `DocumentNode`. |
+4-1
exchanges/persisted-fetch/README.md
···3333});
3434```
35353636-The `persistedQueryExchange` supports two configuration options:
3636+The `persistedQueryExchange` supports three configuration options:
37373838- `preferGetForPersistedQueries`: Use `GET` for fetches with persisted queries
3939+- `enforcePersistedQueries`: This disables _automatic persisted queries_ and disables any retry
4040+ logic for how the API responds to persisted queries. Instead it's assumed that they'll always
4141+ succeed.
3942- `generateHash`: A function that takes a GraphQL query and returns the hashed result. This defaults to the `window.crypto` API in the browser and the `crypto` module in node.
40434144The `persistedFetchExchange` only handles queries, so for mutations we keep the