···2222 id: reproduction
2323 attributes:
2424 label: Reproduction
2525- description: Please provide a link via [codesandbox](https://codesandbox.io/s/urql-issue-template-client-iui0o) or a link to a repo that can reproduce the problem you ran into. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. If a report is vague (e.g. just a generic error message) and if no reproduction is provided the issue will be auto-closed.
2525+ description: Please provide a link to a reproduction. Templates can be found in the [examples folder](https://github.com/urql-graphql/urql/tree/main/examples). A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. If a report is vague (e.g. just a generic error message) and if no reproduction is provided the issue will be auto-closed.
2626 placeholder: Reproduction
2727 validations:
2828 required: true
+7
CONTRIBUTING.md
···3030instead.** Following this makes it very clear whether it's a known behavior, an unexpected issue,
3131or an undocumented quirk.
32323333+We do ask that issues _aren’t_ created for questions, or where a bug is likely to be either caused
3434+by misusage or misconfiguration. In short, if you can’t provide a reproduction of the issue, then
3535+it may be the case that you’ve got a question instead.
3636+3737+If you need a template for creating a reproduction, all of our examples can be opened in isolated
3838+sandboxes or modified as you see fit: https://github.com/urql-graphql/urql/tree/main/examples
3939+3340### How do I propose changes?
34413542We follow an **RFC proposal process**. This allows anyone to propose a new feature or a change, and
+2
docs/advanced/authentication.md
···1010The purpose of the [`authExchange`](../api/auth-exchange.md) is to provide a flexible API that facilitates the typical
1111JWT-based authentication flow.
12121313+> **Note:** [You can find a code example for `@urql/exchange-auth` in an example in the `urql` repository.](https://github.com/urql-graphql/urql/tree/main/examples/with-refresh-auth)
1414+1315## Typical Authentication Flow
14161517**Initial login** — the user opens the application and authenticates for the first time. They enter their credentials and receive an auth token.
+4
docs/advanced/persistence-and-uploads.md
···3232subscription exchanges by adding metadata for persisted queries to each GraphQL
3333request by modifying the `extensions` object of operations.
34343535+> **Note:** [You can find a code example for `@urql/exchange-persisted` in an example in the `urql` repository.](https://github.com/urql-graphql/urql/tree/main/examples/with-apq)
3636+3537### Installation & Setup
36383739First install `@urql/exchange-persisted` alongside `urql`:
···131133132134> **Note:** Previously, this worked by installing the `@urql/multipart-fetch-exchange` package.
133135> however, this package has been deprecated and file uploads are now built into `@urql/core@4`.
136136+137137+[You can find a code example for file uploads in an example in the `urql` repository.](https://github.com/urql-graphql/urql/tree/main/examples/with-multipart)
+2
docs/advanced/retry-operations.md
···99retry only network errors, but we can specify additional options to add
1010functionality.
11111212+> **Note:** [You can find a code example for `@urql/exchange-retry` in an example in the `urql` repository.](https://github.com/urql-graphql/urql/tree/main/examples/with-retry)
1313+1214## Installation and Setup
13151416First install `@urql/exchange-retry` alongside `urql`:
+25-2
docs/advanced/subscriptions.md
···5050[Observable spec](https://github.com/tc39/proposal-observable), which comes down to having an
5151object with a `.subscribe()` method accepting an observer.
52525353-## Setting up `graphql-ws`
5353+### Setting up `graphql-ws`
54545555For backends supporting `graphql-ws`, we recommend using the [graphql-ws](https://github.com/enisdenjo/graphql-ws) client.
5656···88888989[Read more on the `graphql-ws` README.](https://github.com/enisdenjo/graphql-ws/blob/master/README.md)
90909191-## Setting up `subscriptions-transport-ws`
9191+### Setting up `subscriptions-transport-ws`
92929393For backends supporting `subscriptions-transport-ws`, [Apollo's `subscriptions-transport-ws`
9494package](https://github.com/apollographql/subscriptions-transport-ws) can be used.
···118118we return to the `subscriptionExchange` inside `forwardSubscription`.
119119120120[Read more about `subscription-transport-ws` on its README.](https://github.com/apollographql/subscriptions-transport-ws/blob/master/README.md)
121121+122122+### Using `fetch` for subscriptions
123123+124124+Some GraphQL backends (for example GraphQL Yoga) support built-in transport protocols that
125125+can execute subscriptions via a simple HTTP fetch call.
126126+In fact, this is how `@defer` and `@stream` directives are supported. These transports can
127127+also be used for subscriptions.
128128+129129+```js
130130+import { Client, cacheExchange, fetchExchange, subscriptionExchange } from 'urql';
131131+132132+const client = new Client({
133133+ url: '/graphql',
134134+ fetchSubscriptions: true,
135135+ exchanges: [cacheExchange, fetchExchange],
136136+});
137137+```
138138+139139+In this example, we only need to enable `fetchSubscriptions: true` on the `Client`, and the
140140+`fetchExchange` will be used to send subscriptions to the API. If your API supports this transport,
141141+it will stream results back to the `fetchExchange`.
142142+143143+[You can find a code example of subscriptions via `fetch` in an example in the `urql` repository.](https://github.com/urql-graphql/urql/tree/main/examples/with-subscriptions-via-fetch)
121144122145## React & Preact
123146
+366-17
examples/README.md
···11-| Example | Description |
22-| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
33-| [`with-react`](./with-react) | Shows a basic query in `urql` with React. |
44-| [`with-react-native`](./with-react-native) | Shows a basic query in `urql` with React Native. |
55-| [`with-svelte`](./with-svelte) | Shows a basic query in `@urql/svelte` with Svelte. |
66-| [`with-vue3`](./with-vue3) | Shows a basic query in `@urql/vue` with Vue 3. |
77-| [`with-next`](./with-next) | Shows some examples with `next-urql` in Next.js with the default, `getStaticProps` and `getServerSideProps`. |
88-| [`with-pagination`](./with-pagination) | Shows how to generically set up pagination with `urql` in UI code. |
99-| [`with-infinite-pagination`](./with-infinite-pagination) | Shows how to generically set up infinite scrolling pagination with `urql` in UI code. |
1010-| [`with-apq`](./with-apq) | Shows Automatic Persisted Queries with `@urql/exchange-persisted-fetch`. |
1111-| [`with-graphcache-updates`](./with-graphcache-updates) | Shows manual cache updates with `@urql/exchange-graphcache`. |
1212-| [`with-graphcache-pagination`](./with-graphcache-pagination) | Shows the automatic infinite pagination helpers from `@urql/exchange-graphcache`. |
1313-| [`with-multipart`](./with-multipart) | Shows file upload support with `@urql/exchange-multipart-fetch`. |
1414-| [`with-refresh-auth`](./with-refresh-auth) | Shows an example of authentication with refresh tokens using `@urql/exchange-auth`. |
1515-| [`with-retry`](./with-retry) | Shows how to set up `@urql/exchange-retry` for retrying failed operations. |
1616-| [`with-defer-stream-directives`](./with-defer-stream-directives) | Demonstrates `urql` and `@urql/exchange-graphcache` with built-in support for `@defer` and `@stream`. |
1717-| [`with-subscriptions-via-fetch`](./with-subscriptions-via-fetch) | Demonstrates `urql` executing subscriptions with a GraphQL Yoga API via the `fetchExchange`. |
11+<table>
22+<thead>
33+ <tr>
44+ <th>Example</th>
55+ <th></th>
66+ <th></th>
77+ </tr>
88+</thead>
99+<tbody>
1010+1111+<tr>
1212+ <td>
1313+ <a href="./with-react"><strong>with-react</strong></a><br />
1414+ </td>
1515+ <td>
1616+ Shows a basic query in <code>urql</code> with React.
1717+ </td>
1818+ <td>
1919+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-react">
2020+ <img
2121+ alt="Open in StackBlitz"
2222+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
2323+ />
2424+ </a>
2525+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-react">
2626+ <img
2727+ alt="Open in CodeSandbox"
2828+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
2929+ />
3030+ </a>
3131+ </td>
3232+</tr>
3333+3434+<tr>
3535+ <td>
3636+ <a href="./with-react-native"><strong>with-react-native</strong></a><br />
3737+ </td>
3838+ <td>
3939+ Shows a basic query in <code>urql</code> with React Native.
4040+ </td>
4141+ <td>
4242+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-react-native">
4343+ <img
4444+ alt="Open in StackBlitz"
4545+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
4646+ />
4747+ </a>
4848+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-react-native">
4949+ <img
5050+ alt="Open in CodeSandbox"
5151+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
5252+ />
5353+ </a>
5454+ </td>
5555+</tr>
5656+5757+<tr>
5858+ <td>
5959+ <a href="./with-svelte"><strong>with-svelte</strong></a><br />
6060+ </td>
6161+ <td>
6262+ Shows a basic query in <code>@urql/svelte</code> with Svelte.
6363+ </td>
6464+ <td>
6565+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-svelte">
6666+ <img
6767+ alt="Open in StackBlitz"
6868+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
6969+ />
7070+ </a>
7171+ <a
7272+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-svelte">
7373+ <img
7474+ alt="Open in CodeSandbox"
7575+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
7676+ />
7777+ </a>
7878+ </td>
7979+</tr>
8080+8181+<tr>
8282+ <td>
8383+ <a href="./with-vue3"><strong>with-vue3</strong></a><br />
8484+ </td>
8585+ <td>
8686+ Shows a basic query in <code>@urql/vue</code> with Vue 3.
8787+ </td>
8888+ <td>
8989+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-vue3">
9090+ <img
9191+ alt="Open in StackBlitz"
9292+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
9393+ />
9494+ </a>
9595+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-vue3">
9696+ <img
9797+ alt="Open in CodeSandbox"
9898+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
9999+ />
100100+ </a>
101101+ </td>
102102+</tr>
103103+104104+<tr>
105105+ <td>
106106+ <a href="./with-next"><strong>with-next</strong></a><br />
107107+ </td>
108108+ <td>
109109+ Shows a basic query in <code>next-urql</code> with Next.js.
110110+ </td>
111111+ <td>
112112+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-next">
113113+ <img
114114+ alt="Open in StackBlitz"
115115+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
116116+ />
117117+ </a>
118118+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-next">
119119+ <img
120120+ alt="Open in CodeSandbox"
121121+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
122122+ />
123123+ </a>
124124+ </td>
125125+</tr>
126126+127127+<tr>
128128+ <td>
129129+ <a href="./with-pagination"><strong>with-pagination</strong></a><br />
130130+ </td>
131131+ <td>
132132+ Shows how to generically set up pagination with <code>urql</code> in UI code.
133133+ </td>
134134+ <td>
135135+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-pagination">
136136+ <img
137137+ alt="Open in StackBlitz"
138138+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
139139+ />
140140+ </a>
141141+ <a
142142+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-pagination">
143143+ <img
144144+ alt="Open in CodeSandbox"
145145+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
146146+ />
147147+ </a>
148148+ </td>
149149+</tr>
150150+151151+<tr>
152152+ <td>
153153+ <a href="./with-infinite-pagination"><strong>with-infinite-pagination</strong></a><br />
154154+ </td>
155155+ <td>
156156+ Shows how to generically set up infinite scrolling pagination with <code>urql</code> in UI code.
157157+ </td>
158158+ <td>
159159+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-infinite-pagination">
160160+ <img
161161+ alt="Open in StackBlitz"
162162+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
163163+ />
164164+ </a>
165165+ <a
166166+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-infinite-pagination">
167167+ <img
168168+ alt="Open in CodeSandbox"
169169+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
170170+ />
171171+ </a>
172172+ </td>
173173+</tr>
174174+175175+<tr>
176176+ <td>
177177+ <a href="./with-apq"><strong>with-apq</strong></a><br />
178178+ </td>
179179+ <td>
180180+ Shows Automatic Persisted Queries with <code>@urql/exchange-persisted</code>.
181181+ </td>
182182+ <td>
183183+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-apq">
184184+ <img
185185+ alt="Open in StackBlitz"
186186+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
187187+ />
188188+ </a>
189189+ <a
190190+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-apq">
191191+ <img
192192+ alt="Open in CodeSandbox"
193193+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
194194+ />
195195+ </a>
196196+ </td>
197197+</tr>
198198+199199+<tr>
200200+ <td>
201201+ <a href="./with-graphcache-updates"><strong>with-graphcache-updates</strong></a><br />
202202+ </td>
203203+ <td>
204204+ Shows manual cache updates with <code>@urql/exchange-graphcache</code>.
205205+ </td>
206206+ <td>
207207+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-graphcache-updates">
208208+ <img
209209+ alt="Open in StackBlitz"
210210+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
211211+ />
212212+ </a>
213213+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-graphcache-updates">
214214+ <img
215215+ alt="Open in CodeSandbox"
216216+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
217217+ />
218218+ </a>
219219+ </td>
220220+</tr>
221221+222222+<tr>
223223+ <td>
224224+ <a href="./with-graphcache-pagination"><strong>with-graphcache-pagination</strong></a><br />
225225+ </td>
226226+ <td>
227227+ Shows the automatic infinite pagination helpers from <code>@urql/exchange-graphcache</code>.
228228+ </td>
229229+ <td>
230230+ <a
231231+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-graphcache-pagination">
232232+ <img
233233+ alt="Open in StackBlitz"
234234+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
235235+ />
236236+ </a>
237237+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-graphcache-pagination">
238238+ <img
239239+ alt="Open in CodeSandbox"
240240+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
241241+ />
242242+ </a>
243243+ </td>
244244+</tr>
245245+246246+<tr>
247247+ <td>
248248+ <a href="./with-multipart"><strong>with-multipart</strong></a><br />
249249+ </td>
250250+ <td>
251251+ Shows file upload support integrated in <code>@urql/core</code>.
252252+ </td>
253253+ <td>
254254+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-multipart">
255255+ <img
256256+ alt="Open in StackBlitz"
257257+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
258258+ />
259259+ </a>
260260+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-multipart">
261261+ <img
262262+ alt="Open in CodeSandbox"
263263+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
264264+ />
265265+ </a>
266266+ </td>
267267+</tr>
268268+269269+<tr>
270270+ <td>
271271+ <a href="./with-refresh-auth"><strong>with-refresh-auth</strong></a><br />
272272+ </td>
273273+ <td>
274274+ Shows authentication with refresh tokens using <code>@urql/exchange-auth</code>.
275275+ </td>
276276+ <td>
277277+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-refresh-auth">
278278+ <img
279279+ alt="Open in StackBlitz"
280280+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
281281+ />
282282+ </a>
283283+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-refresh-auth">
284284+ <img
285285+ alt="Open in CodeSandbox"
286286+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
287287+ />
288288+ </a>
289289+ </td>
290290+</tr>
291291+292292+<tr>
293293+ <td>
294294+ <a href="./with-retry"><strong>with-retry</strong></a><br />
295295+ </td>
296296+ <td>
297297+ Shows retrying of failed operations with <code>@urql/exchange-retry</code>.
298298+ </td>
299299+ <td>
300300+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-retry">
301301+ <img
302302+ alt="Open in StackBlitz"
303303+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
304304+ />
305305+ </a>
306306+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-retry">
307307+ <img
308308+ alt="Open in CodeSandbox"
309309+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
310310+ />
311311+ </a>
312312+ </td>
313313+</tr>
314314+315315+<tr>
316316+ <td>
317317+ <a href="./with-defer-stream-directives"><strong>with-defer-stream-directives</strong></a><br />
318318+ </td>
319319+ <td>
320320+ Demonstrates <code>urql</code> and <code>@urql/exchange-graphcache</code> with built-in support for <code>@defer</code> and <code>@stream</code>.
321321+ </td>
322322+ <td>
323323+ <a
324324+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-defer-stream-directives">
325325+ <img
326326+ alt="Open in StackBlitz"
327327+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
328328+ />
329329+ </a>
330330+ <a
331331+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-defer-stream-directives">
332332+ <img
333333+ alt="Open in CodeSandbox"
334334+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
335335+ />
336336+ </a>
337337+ </td>
338338+</tr>
339339+340340+<tr>
341341+ <td>
342342+ <a href="./with-subscriptions-via-fetch"><strong>with-subscriptions-via-fetch</strong></a><br />
343343+ </td>
344344+ <td>
345345+ Demonstrates <code>@urql/core</code>'s built-in support for executing subscriptions with a GraphQL Yoga API via the <code>fetchExchange</code>.
346346+ </td>
347347+ <td>
348348+ <a
349349+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-subscriptions-via-fetch">
350350+ <img
351351+ alt="Open in StackBlitz"
352352+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz"
353353+ />
354354+ </a>
355355+ <a
356356+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-subscriptions-via-fetch">
357357+ <img
358358+ alt="Open in CodeSandbox"
359359+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox"
360360+ />
361361+ </a>
362362+ </td>
363363+</tr>
364364+365365+</tbody>
366366+</table>
+15
examples/with-apq/README.md
···11# With Automatic Persisted Queries
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-apq">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-apq">
1111+ <img
1212+ alt="Open in CodeSandbox"
1313+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1414+ />
1515+ </a>
1616+</p>
1717+318This example shows `urql` in use with `@urql/exchange-persisted-fetch`'s `persistedFetchExchange`
419to support [Automatic Persisted
520Queries](https://www.apollographql.com/docs/apollo-server/performance/apq/). This largely follows
···11# With `@defer` / `@stream` Directives
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-defer-stream-directives">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a
1111+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-defer-stream-directives">
1212+ <img
1313+ alt="Open in CodeSandbox"
1414+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1515+ />
1616+ </a>
1717+</p>
1818+319This example shows `urql` in use [with `@defer` and `@stream`
420directives](https://graphql.org/blog/2020-12-08-improving-latency-with-defer-and-stream-directives)
521in GraphQL.
+17
examples/with-graphcache-pagination/README.md
···11# With Graphcache's Pagination
2233+<p>
44+ <a
55+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-graphcache-pagination">
66+ <img
77+ alt="Open in StackBlitz"
88+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
99+ />
1010+ </a>
1111+ <a
1212+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-graphcache-pagination">
1313+ <img
1414+ alt="Open in CodeSandbox"
1515+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1616+ />
1717+ </a>
1818+</p>
1919+320This example shows `urql` in use with `@urql/exchange-graphcache`'s infinite pagination helpers to
421merge several pages of a Relay-compliant schema into an infinite list.
522This largely follows the ["Pagination" section on the "Local Resolvers" docs
+17
examples/with-graphcache-updates/README.md
···11# With Graphcache's Pagination
2233+<p>
44+ <a
55+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-graphcache-updates">
66+ <img
77+ alt="Open in StackBlitz"
88+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
99+ />
1010+ </a>
1111+ <a
1212+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-graphcache-updates">
1313+ <img
1414+ alt="Open in CodeSandbox"
1515+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1616+ />
1717+ </a>
1818+</p>
1919+320This example shows `urql` in use with `@urql/exchange-graphcache` and demonstrates a manual cache
421update, as explained in [the "Cache Updates" docs page](https://formidable.com/open-source/urql/docs/graphcache/cache-updates/).
522This example uses the [`trygql.formidable.dev/graphql/web-collections`
+17
examples/with-infinite-pagination/README.md
···11# With Infinite Pagination (in React)
2233+<p>
44+ <a
55+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-infinite-pagination">
66+ <img
77+ alt="Open in StackBlitz"
88+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
99+ />
1010+ </a>
1111+ <a
1212+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-infinite-pagination">
1313+ <img
1414+ alt="Open in CodeSandbox"
1515+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1616+ />
1717+ </a>
1818+</p>
1919+320This example shows how to implement **infinite scroll** pagination with `urql`
421in your React UI code.
522
+16
examples/with-multipart/README.md
···11# With Multipart File Upload
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-multipart">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a
1111+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-multipart">
1212+ <img
1313+ alt="Open in CodeSandbox"
1414+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1515+ />
1616+ </a>
1717+</p>
1818+319This example shows `urql` in use with `@urql/exchange-multipart-fetch`'s `multipartFetchExchange`
420to support file uploads in GraphQL. This largely follows the ["File Uploads" docs
521page](https://formidable.com/open-source/urql/docs/advanced/persistence-and-uploads/)
+15
examples/with-next/README.md
···11# With Next.js
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-next">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-next">
1111+ <img
1212+ alt="Open in CodeSandbox"
1313+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1414+ />
1515+ </a>
1616+</p>
1717+318This example shows `next-urql` and `urql` in use with Next.js as explained [in the "Next.js" section
419on the "Server-side Rendering" docs
520page](https://formidable.com/open-source/urql/docs/advanced/server-side-rendering/#nextjs).
+16
examples/with-pagination/README.md
···11# With Pagination (in React)
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-pagination">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a
1111+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-pagination">
1212+ <img
1313+ alt="Open in CodeSandbox"
1414+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1515+ />
1616+ </a>
1717+</p>
1818+319This example shows how to implement pagination with `urql` in your React UI code.
420521It renders several pages as fragments with one component managing the variables
+16
examples/with-react-native/README.md
···11# With React Native
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-react-native">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a
1111+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-react-native">
1212+ <img
1313+ alt="Open in CodeSandbox"
1414+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1515+ />
1616+ </a>
1717+</p>
1818+319This example shows `urql` in use with React Native.
420521To run this example install dependencies and run the `start` script:
+15
examples/with-react/README.md
···11# With React
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-react">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-react">
1111+ <img
1212+ alt="Open in CodeSandbox"
1313+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1414+ />
1515+ </a>
1616+</p>
1717+318This example shows `urql` in use with React, as explained on the ["React/Preact" page of the "Basics"
419documentation.](https://formidable.com/open-source/urql/docs/basics/react-preact/)
520
+16
examples/with-refresh-auth/README.md
···11# With Refresh Authentication
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-refresh-auth">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a
1111+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-refresh-auth">
1212+ <img
1313+ alt="Open in CodeSandbox"
1414+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1515+ />
1616+ </a>
1717+</p>
1818+319This example shows `urql` in use with `@urql/exchange-auth`'s `authExchange`
420to support authentication token and refresh token logic. This largely follows the ["Authentication" docs
521page](https://formidable.com/open-source/urql/docs/advanced/authentication/)
···11# With Subscriptions via Fetch
2233+<p>
44+ <a
55+ href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-subscriptions-via-fetch">
66+ <img
77+ alt="Open in StackBlitz"
88+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
99+ />
1010+ </a>
1111+ <a
1212+ href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-subscriptions-via-fetch">
1313+ <img
1414+ alt="Open in CodeSandbox"
1515+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1616+ />
1717+ </a>
1818+</p>
1919+320This example shows `urql` in use with subscriptions running via a plain `fetch`
421HTTP request to GraphQL Yoga. This uses the [GraphQL Server-Sent
522Events](https://the-guild.dev/blog/graphql-over-sse) protocol, which means that
+15
examples/with-svelte/README.md
···11# With Svelte
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-svelte">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-svelte">
1111+ <img
1212+ alt="Open in CodeSandbox"
1313+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1414+ />
1515+ </a>
1616+</p>
1717+318This example shows `@urql/svelte` in use with Svelte, as explained on the ["Svelte" page of the "Basics"
419documentation.](https://formidable.com/open-source/urql/docs/basics/svelte/)
520
+15
examples/with-vue3/README.md
···11# With Vue 3
2233+<p>
44+ <a href="https://stackblitz.com/github/urql-graphql/urql/tree/main/examples/with-vue3">
55+ <img
66+ alt="Open in StackBlitz"
77+ src="https://img.shields.io/badge/open_in_stackblitz-1269D3?logo=stackblitz&style=for-the-badge"
88+ />
99+ </a>
1010+ <a href="https://codesandbox.io/p/sandbox/github/urql-graphql/urql/tree/main/examples/with-vue3">
1111+ <img
1212+ alt="Open in CodeSandbox"
1313+ src="https://img.shields.io/badge/open_in_codesandbox-151515?logo=codesandbox&style=for-the-badge"
1414+ />
1515+ </a>
1616+</p>
1717+318This example shows `@urql/vue` in use with Vue 3, as explained on the ["Vue" page of the "Basics"
419documentation.](https://formidable.com/open-source/urql/docs/basics/vue/)
520