+4
-2
docs/basics/ui-patterns.md
+4
-2
docs/basics/ui-patterns.md
···-list that constantly changes. [You can find a full code example of this pattern in our example folder on the topic of Graphcache pagination.](https://github.com/urql-graphql/urql/tree/main/examples/with-graphcache-pagination)+list that constantly changes. [You can find a full code example of this pattern in our example folder on the topic of pagination.](https://github.com/urql-graphql/urql/tree/main/examples/with-pagination)-We also do not need to use our normalized cache to achieve this. As long as we're able to split individual lists up into chunks across components, we can also solve this problem entirely in UI code. [Read our example code on how to achieve this.](https://github.com/urql-graphql/urql/tree/main/examples/with-pagination)+example that takes full infinite scrolling into account, [you can find a full code example of an+extended pattern in our example folder on the topic of infinite pagination.](https://github.com/urql-graphql/urql/tree/main/examples/with-infinite--pagination)
+8
docs/graphcache/local-resolvers.md
+8
docs/graphcache/local-resolvers.md
···with separate components per page in environments like React Native, where a `FlatList` would+> **Note:** If you don't need a flat array of results, you can also achieve infinite pagination+> with only UI code. [You can find a code example of UI infinite pagination in our example folder.](https://github.com/urql-graphql/urql/tree/main/examples/with-pagination)+[You can find a code example of infinite pagination with Graphcahce in our example folder.](https://github.com/urql-graphql/urql/tree/main/examples/with-graphcache-pagination).+Please keep in mind that this patterns has some limitations when you're handling cache updates.+Deleting old pages from the cache selectively may be difficult, so the UI pattern in the above
+3
-1
examples/README.md
+3
-1
examples/README.md
···| [`with-next`](./with-next) | Shows some examples with `next-urql` in Next.js with the default, `getStaticProps` and `getServerSideProps`. |-| [`with-pagination`](./with-pagination) | Shows how to generically set up infinite pagination with `urql` in UI code. |+| [`with-pagination`](./with-pagination) | Shows how to generically set up pagination with `urql` in UI code. |+| [`with-infinite-pagination`](./with-infinite-pagination) | Shows how to generically set up infinite scrolling pagination with `urql` in UI code. || [`with-apq`](./with-apq) | Shows Automatic Persisted Queries with `@urql/exchange-persisted-fetch`. || [`with-graphcache-updates`](./with-graphcache-updates) | Shows manual cache updates with `@urql/exchange-graphcache`. || [`with-graphcache-pagination`](./with-graphcache-pagination) | Shows the automatic infinite pagination helpers from `@urql/exchange-graphcache`. |···| [`with-refresh-auth`](./with-refresh-auth) | Shows an example of authentication with refresh tokens using `@urql/exchange-auth`. || [`with-retry`](./with-retry) | Shows how to set up `@urql/exchange-retry` for retrying failed operations. || [`with-defer-stream-directives`](./with-defer-stream-directives) | Demonstrates `urql` and `@urql/exchange-graphcache` with built-in support for `@defer` and `@stream`. |+| [`with-subscriptions-via-fetch`](./with-subscriptions-via-fetch) | Demonstrates `urql` executing subscriptions with a GraphQL Yoga API via the `fetchExchange`. |
+41
examples/with-infinite-pagination/README.md
+41
examples/with-infinite-pagination/README.md
···
+27
examples/with-infinite-pagination/index.html
+27
examples/with-infinite-pagination/index.html
···
+19
examples/with-infinite-pagination/package.json
+19
examples/with-infinite-pagination/package.json
···
+52
examples/with-infinite-pagination/src/App.jsx
+52
examples/with-infinite-pagination/src/App.jsx
···
+172
examples/with-infinite-pagination/src/SearchResults.jsx
+172
examples/with-infinite-pagination/src/SearchResults.jsx
···+{/* The <SearchPage> component receives the same props, plus the `afterCursor` for its variables */}+// We don't want to run the query if we don't have a cursor (in this example, this will never happen)+{/* As before, the next <SearchPage> will not fetch immediately, but only query from cache */}
+6
examples/with-infinite-pagination/src/index.jsx
+6
examples/with-infinite-pagination/src/index.jsx
+7
examples/with-infinite-pagination/vite.config.js
+7
examples/with-infinite-pagination/vite.config.js
+5
-3
examples/with-pagination/README.md
+5
-3
examples/with-pagination/README.md
···-renders several pages as fragments with one component managing the variables for the page queries.