Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DQR-003Data & Query RiskUnbounded query risk without limit/pagination evidence
Flags list/query paths without obvious limit or pagination controls.
warningviolationNo auto-fix
How to fix
- Add limit and pagination parameters.
- Set a maximum page size.
- For exports, move heavy reads to an explicit export workflow with operational safeguards.
What it means
A query path can return an unbounded number of rows.
Why it matters
Unbounded queries can degrade production systems and create unpredictable API behavior.
Common causes
- A list endpoint was added without pagination.
- A batch export reuses online request code.
- The limit is applied in a layer ArchPilot cannot see.
Example bad pattern
findMany({ where: { organizationId } })Example good pattern
findMany({ where: { organizationId }, take: pageSize, skip: offset })Related files/config
apps/api/srcpackages/db/prisma/schema.prisma
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs