Skip to content

Commit

Permalink
docs(www): adjust documentation for overriding page limit (#494)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Schmidt <[email protected]>
  • Loading branch information
devtim123 and Tim Schmidt authored May 4, 2023
1 parent 1a0d194 commit 69d642a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions www/content/guides/page-limit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,30 @@ The following will return 100 items (Overridden using `path`):

```ts
const articles = await drupal.getResourceCollection("node--article", {
"field[node--article]": "path,title",
params: {
"fields[node--article]": "path,title"
}
})
```

The following will return 60 items (Overridden using `path`):

```ts
const articles = await drupal.getResourceCollection("node--article", {
"field[node--article]": "path,title",
"page[limit]": 60,
params: {
"fields[node--article]": "path,title",
"page[limit]": 60,
}
})
```

The following will return 100 items (`next_jsonapi.size_max` hard limit - Overridden using `path`):

```ts
const articles = await drupal.getResourceCollection("node--article", {
"field[node--article]": "path,title",
"page[limit]": 999,
params: {
"fields[node--article]": "path,title",
"page[limit]": 999,
}
})
```

1 comment on commit 69d642a

@vercel
Copy link

@vercel vercel bot commented on 69d642a May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.