Phoenix JSON API Pagination and Filtering

How do you provide pagination and filtering to your Phoenix Framework JSON APIs?

Couple of years ago I used Scrivener and Inquisitor but they are not maintained anymore.

I have been using flop (GitHub - woylie/flop: Filtering, ordering and pagination for Ecto) since it supports cursor-based pagination and it appears to be actively maintained.

4 Likes

Thanks,

Have you encountered any issues since flop does not support combining filters with OR?

There’s also this repo, which I am just about to try out for the first time:

2 Likes

In the projects where I have used flop, I don’t have complex filtering needs so I haven’t missed the lack of OR capability yet.

1 Like

Ash Framework has pagination/sorting/filtering built in, may be worth looking into if you haven’t before.

2 Likes

4 Likes

I find this wildly offensive.

1 Like

we’re clearly giving out free code here, not free candy

8 Likes