You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am 99% sure that you can limit and use offset while populating so saying that you can not is strange + it will cause people to not limit there stuff with populates (this is only on the top level or the request the docs make it sound like it is not possible at all)
The text was updated successfully, but these errors were encountered:
Boegie19
changed the title
[Bug]: populate and paginate not possible together
[Bug]: The population and pagination operators cannot be combined.
Mar 9, 2023
The documentation is not clear about this issue, i.e "pagination on population". If this feature does not exist, it is better to explain the reason transparently. Or if it exists and, for example, it is not recommended to do this from a performance perspective, it should be explained.
Currently, pagination on population with the limit and start keys works in version v4.9 (although no information about the total number of paginated items is provided in the output).
For example, the following API correctly retrieves the first post and returns only the second five comments for this post.
Strapi Version: v4.9.2
Get: /api/posts?fields=title&populate[comments][limit]=5&populate[comments][start]=5
Result: It works correctly.
However, using pageSize and page in this case does not work. i.e:
Strapi Version: v4.9.2
Get: /api/posts?fields=title&populate[comments][pageSize]=5&populate[comments][page]=2
Result: It doesn't work (it returns all items in the populated field).
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/api/rest/populate-select#combining-population-with-other-operators
Describe the bug
I am 99% sure that you can limit and use offset while populating so saying that you can not is strange + it will cause people to not limit there stuff with populates (this is only on the top level or the request the docs make it sound like it is not possible at all)
Additional context
No response
Suggested improvements or fixes
remove it or clarify its meaning
Related issue(s)/PR(s)
https://forum.strapi.io/t/advanced-api-filter-combining-and-and-or/24375/10
The text was updated successfully, but these errors were encountered: