From 69d642ac6343acfd5a769b39df3fc5b6be278ab5 Mon Sep 17 00:00:00 2001 From: Tim Schmidt Date: Thu, 4 May 2023 09:10:44 +0200 Subject: [PATCH] docs(www): adjust documentation for overriding page limit (#494) Co-authored-by: Tim Schmidt --- www/content/guides/page-limit.mdx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/www/content/guides/page-limit.mdx b/www/content/guides/page-limit.mdx index b0dd2293..f01f46a0 100644 --- a/www/content/guides/page-limit.mdx +++ b/www/content/guides/page-limit.mdx @@ -46,7 +46,9 @@ 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" + } }) ``` @@ -54,8 +56,10 @@ 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, + } }) ``` @@ -63,7 +67,9 @@ The following will return 100 items (`next_jsonapi.size_max` hard limit - Overri ```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, + } }) ```