Offset pagination for Vapor 🗂
try User
.query(on: req)
.paginate(for: req, type: OffsetPaginator.self)
...
This is useful in cases where the type cannot be inferred and you would have had to split up a chain to be able to add type information. In case the type can be inferred, you can omit this parameter.
This parameter has been added to all paginate
functions that return a generic Paginator
.