Skip to content

pagination

Concerns $limit/$skip or the paginated result shape.

NameCategoryDescription
disablePagination
hooks

Disables pagination when query.$limit is -1 or '-1'. Removes the $limit from the query and sets params.paginate = false. Must be used as a before or around hook on the find method.

getPaginate
utils

Resolves the active pagination options for the current hook context. Checks (in order): context.params.paginate, service.options.paginate, and context.params.adapter.paginate. Returns undefined if pagination is disabled.

toPaginated
utils

Ensures a result is in Feathers paginated format ({ total, limit, skip, data }). If the input is already paginated, it is returned as-is. If it is a plain array, it is wrapped in a paginated object with total and limit set to the array length.

isPaginated
predicates

Checks if the current find operation is paginated by inspecting params.paginate and the service's pagination options via getPaginate. Returns false for all methods other than find or when pagination is disabled.

See all tags for the full vocabulary.

Released under the MIT License.