From a89e89fb80eec1958036998c87f050b892a0fc29 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 15 Oct 2023 09:44:00 -0400 Subject: [PATCH] chore: documents pagination: false --- docs/local-api/overview.mdx | 1 + docs/queries/pagination.mdx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/local-api/overview.mdx b/docs/local-api/overview.mdx index a3040e19e..569f303e7 100644 --- a/docs/local-api/overview.mdx +++ b/docs/local-api/overview.mdx @@ -131,6 +131,7 @@ const result = await payload.find({ depth: 2, page: 1, limit: 10, + pagination: false, // If you want to disable pagination count, etc. where: {}, // pass a `where` query here sort: '-title', locale: 'en', diff --git a/docs/queries/pagination.mdx b/docs/queries/pagination.mdx index 67215cf9c..c0c327000 100644 --- a/docs/queries/pagination.mdx +++ b/docs/queries/pagination.mdx @@ -59,3 +59,7 @@ All Payload APIs support the pagination controls below. With them, you can creat | ------- | --------------------------------------- | | `limit` | Limits the number of documents returned | | `page` | Get a specific page number | + +### Disabling pagination within Local API + +For `find` operations within the Local API, you can disable pagination to retrieve all documents from a collection by passing `pagination: false` to the `find` local operation. This is not supported in REST or GraphQL, however, because it could potentially lead to malicious activity. \ No newline at end of file