diff --git a/packages/core/src/functions/getAll.ts b/packages/core/src/functions/getAll.ts index 21710151..f58d0f19 100644 --- a/packages/core/src/functions/getAll.ts +++ b/packages/core/src/functions/getAll.ts @@ -80,9 +80,11 @@ const internalGetAll = async ( }) } - pipeline.push({ - $limit: limit, - }) + if( limit ) { + pipeline.push({ + $limit: limit, + }) + } if( project ) { const projection = normalizeProjection(project, context.description)