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
There is some conflicting information in the docs regarding pagination behavior when no page query parameters are sent by the client.
Here, it implies that requests will always be paginated by default by what is defined on the model, or by what is set as the default on the paginator:
But here, there is a section about forcing pagination when no query parameters are set:
The latter is the behavior I observe as being correct but the documentation of the former makes this confusing and I'm not sure what the point of it is.
The text was updated successfully, but these errors were encountered:
Wizofgoz
changed the title
Confusion over pagination documentation
Confusion over default pagination documentation
Feb 6, 2021
Ah yes I can see how that is confusing - thanks for raising.
For the page size section, it's talking about the page size it uses if the client provides page parameter but does not provide a page size for it. For example:
GET /api/v1/posts?page[number]=1
It will return a paginated response, with the page size specified on either the model, or the withDefaultPerPage() method if that has been used.
However if a client calls:
GET /api/v1/posts
i.e. no page parameters, then the response will not be paginated - unless you've set the $defaultPagination property, in which case the client will get a paginated response as per your default pagination settings.
There is some conflicting information in the docs regarding pagination behavior when no page query parameters are sent by the client.
Here, it implies that requests will always be paginated by default by what is defined on the model, or by what is set as the default on the paginator:

But here, there is a section about forcing pagination when no query parameters are set:

The latter is the behavior I observe as being correct but the documentation of the former makes this confusing and I'm not sure what the point of it is.
The text was updated successfully, but these errors were encountered: