graph-client icon indicating copy to clipboard operation
graph-client copied to clipboard

Make auto-pagination use Relay's Cursor Connection Spec

Open chadoh opened this issue 3 years ago • 2 comments

The Cursor Connection Spec has become a de-facto standard in the larger GraphQL ecosystem, as far as I can tell. I first learned about it when using Gatsby, which uses the modified version of the Cursor Connection Spec advocated in this blog post: GraphQL Pagination best practices: Using Edges vs Nodes in Connections (this is my favorite post I've seen on the topic, as it is brief and contains links to other resources).

I have found graph-client's auto pagination difficult to work with on the client side, and would enjoy the flexibility and power offered by the Cursor Connection Spec. I also think this could be built in a backwards-compatible way, adding additional ways to access paginated data if people want to, without removing the method of pagination they're already using.

If y'all agree this is worth trying, I'll have time in my schedule in mid-September to try to help add it.

chadoh avatar Aug 11 '22 14:08 chadoh

@dotansimha I think this is a reflection of the implementation in graph-node, I think you were looking into changing that?

azf20 avatar Aug 11 '22 15:08 azf20

@dotansimha I think this is a reflection of the implementation in graph-node, I think you were looking into changing that?

Yeah, we are still working on improving that in graph-node. After improving it on the schema layer, we'll be able to support that out of the box in graph-client.

dotansimha avatar Aug 17 '22 13:08 dotansimha