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