servant-pagination

Type-safe pagination for Servant APIs

https://github.com/chordify/haskell-servant-pagination

Latest on Hackage:2.5.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

LGPL-3.0-only licensed by Chordify

This module offers opinionated helpers to declare a type-safe and a flexible pagination mecanism for Servant APIs. This design, inspired by Heroku's API, provides a small framework to communicate about a possible pagination feature of an endpoint, enabling a client to consume the API in different fashions (pagination with offset / limit, endless scroll using last referenced resources, ascending and descending ordering, etc.)