From 6395399e1f3e02eb8bbee095ba01d4804dfb211c Mon Sep 17 00:00:00 2001 From: "gento.ogane" Date: Thu, 9 Nov 2023 19:05:22 +0900 Subject: [PATCH] [#11305]update offset-based doc --- docs/source/pagination/offset-based.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/pagination/offset-based.mdx b/docs/source/pagination/offset-based.mdx index 6f3c4b27f3e..546ad577f1e 100644 --- a/docs/source/pagination/offset-based.mdx +++ b/docs/source/pagination/offset-based.mdx @@ -27,7 +27,7 @@ Apollo Client provides an `offsetLimitPagination` helper function that you can u This example uses `offsetLimitPagination` to generate a field policy for `Query.feed`: -```js {2,8} title="index.js" +```jsx {2,8} title="main.jsx" import { InMemoryCache } from "@apollo/client"; import { offsetLimitPagination } from "@apollo/client/utilities"; @@ -87,7 +87,7 @@ In [the example above](#using-with-fetchmore), the GraphQL server returns indivi Because the `offsetLimitPagination` helper is currently defining your field policy, you combine your `read` function with the helper's result, like so: -```js {8-13} title="index.js" +```jsx {8-13} title="main.jsx" import { InMemoryCache } from "@apollo/client"; import { offsetLimitPagination } from "@apollo/client/utilities";