You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, substitute the `fetchExchange` with the `multipartFetchExchange`:
159
159
160
-
```res
160
+
```rescript
161
161
open ReasonUrql
162
162
163
163
let client = Client.make(
164
164
~url="http://localhost:3000",
165
-
~exchanges=[|
165
+
~exchanges=[
166
166
Client.Exchanges.dedupExchange,
167
167
Client.Exchanges.cacheExchange,
168
168
Client.Exchanges.multipartFetchExchange
169
-
|],
169
+
],
170
170
()
171
171
)
172
172
```
173
173
174
174
Read more on the `multipartFetchExchange`[here](https://github.com/FormidableLabs/urql/tree/main/exchanges/multipart-fetch).
175
175
176
+
### `retryExchange`
177
+
178
+
The `retryExchange` is useful for retrying particular operations. By default, adding this exchange with the base options will retry any operations that failed due to network errors. However, we can customize the exchange to catch more specific error cases as well.
179
+
180
+
To use the `retryExchange`, add the package to your dependencies:
181
+
182
+
```sh
183
+
yarn add @urql/exchange-retry
184
+
```
185
+
186
+
Then, add the exchange to your array of `exchanges`, specifying the options you want to configure:
Read more on the `retryExchange`[here](https://formidable.com/open-source/urql/docs/advanced/retry-operations/).
239
+
176
240
## Custom Exchanges
177
241
178
242
`reason-urql` also allows you to write your own exchanges to modify outgoing GraphQL requests and incoming responses. To read up on the basics of exchanges, check out the excellent [`urql` documentation](https://formidable.com/open-source/urql/docs/concepts/exchanges/).
0 commit comments