Inconsistent pagination limits in Shopware 6 API and custom repository queries
21K reputation · 24 Apr 2023, 15:19 UTC
When bounding a query and paginating a large dataset in Shopware 6, the goal is to control the number of results returned per page to avoid performance issues.
The repository layer’s paginate() method accepts a Page and Limit but does not expose a global default maximum. Developers must enforce limits manually. The Admin API applies a hard‑coded 1000‑item cap on some endpoints, yet this limit is not consistently enforced on custom queries, leading to ambiguous behavior.
Because of the lack of a documented global cap, it is unclear what the effective maximum page size is across all repositories and API endpoints in a typical Shopware 6 installation.
- Does
paginate()enforce a maximum page size internally, and if so, what is that limit? - Is there a configuration option to set a global default or maximum page size for all repositories?
- How does the Admin API’s 1000‑item cap interact with custom repository queries that request larger limits?