4 ms·
The main different on pagination, is that you pages return inside an object. And you have have several different objects that all have different pages. With re
by georgyo 6y ago
The main different on pagination, is that you pages return inside an object. And you have have several different objects that all have different pages.
With rest, you can only paginate that particular call. You cannot really paginate different results in that one call. At most you can do is say get the list of objects at this endpoint. And that is far easier to grok than graphql's pagination in even the simple case.
I mean, just look at the official guide on this:
https://graphql.org/learn/pagination/ https://graphql.org/learn/pagination/
And that only covers a simple use case!
- balfirevic 6y ago> With rest, you can only paginate that particular call. You cannot really paginate different results in that one call. Where did you get this idea that REST in any way dictates how you do pagination?
- dudul 6y agoI've implemented the connection spec many times and I find it very clear and usable. Graphql allows you to paginate several collections in the same call, but you certainly don't have to. You can do just like REST and do one at a time.
- andrewingram 6y agoDunno if it'll help at all, but I did write a thing about GraphQL connections that may clear up some things: https://andrewingram.net/posts/demystifying-graphql-connections/ https://andrewingram.net/posts/demystifying-graphql-connecti...