drizzle-graphql icon indicating copy to clipboard operation
drizzle-graphql copied to clipboard

Thoughts on pagination?

Open mattfysh opened this issue 1 year ago • 6 comments

Is this something planned for drizzle-graphql? I noticed a couple of issues related to filtering, would pagination fall under that wide umbrella?

mattfysh avatar Nov 08 '24 22:11 mattfysh

Offset & limit are already supported in query params

Sukairo-02 avatar Nov 26 '24 15:11 Sukairo-02

@Sukairo-02 what about cursor based pagination, relay compliancy etc. Any thoughts/ plans on that?

mdugue avatar Jan 04 '25 06:01 mdugue

Project is really nice, but we really need something for pagination. The minimum would be to return the total number of records so we can do simple pagination. But it would involve to add an intermediate payload for list queries. Is it something you could be open about?

Vincz avatar Apr 13 '25 18:04 Vincz

Project is really nice, but we really need something for pagination. The minimum would be to return the total number of records so we can do simple pagination. But it would involve to add an intermediate payload for list queries. Is it something you could be open about?

agreed, this is really important. May I add, is this project actively maintained? I see no activity and I should understand if it's wise to keep using it for production.

fenicento avatar May 15 '25 13:05 fenicento

We currently have an internal (pretty naive) implementation for Relay-compliant pagination based on this project, essentially sorting and selecting all elements, and then slicing it. Works pretty well for small tables, but we will soon have to optimize the query for larger tables with separate queries for totalCount and the returned elements (hasNext and hasPrevious can be reached by overfetching +1/-1).

Our team also wonders whether this project going to be actively maintained (also going forward with v1+) and whether we could contribute back to the project?

marcpalm avatar Jul 03 '25 11:07 marcpalm

We currently have an internal (pretty naive) implementation for Relay-compliant pagination based on this project, essentially sorting and selecting all elements, and then slicing it. Works pretty well for small tables, but we will soon have to optimize the query for larger tables with separate queries for totalCount and the returned elements (hasNext and hasPrevious can be reached by overfetching +1/-1).

Our team also wonders whether this project going to be actively maintained (also going forward with v1+) and whether we could contribute back to the project?

Hi, Marc. Do you have any plans to open source that?

santigp258 avatar Aug 20 '25 22:08 santigp258