Pagination in GraphQL
We have slicing via limit: INT, but we do not have the ability to specify an offset. Are there plans to add this soon?
GraphQL Documentation actually specifies their pagination terms as follows:
first: int
offset: int
after: _id
Are there plans to implement this at all?

-
Tim commented
From what I gather, a custom resolver would primarily enable the use of pagination with an offset. Supporting a cursor with an 'after: _id' parameter would offer a more robust and fault-tolerant solution.
-
Guillaume commented
@Dev agree with you, but when you say "this was not available" someone can think that it's now available in their API. Unfortunately, not at this moment. The only solution is still to create a custom resolver and use an aggregation to pagination data.
-
Dev commented
Blew my mind this was not available in their graphql api. Caused us major time sink/hassle.
-
Ian commented
Pagination is such a standard feature which is essential on all but tiny datasets. Without doubt there should be a way to handle it built in by default. I don't understand why this isn't implemented. I can't see any downsides.
-
Tim commented
I agree. Without it, the usefulness of the Graphql interface is quite limited. Well, no progress in two years on this topic. I guess we have to use AWS or DGraph instead of MongoDb.
-
Rob commented
Agree. Please can we get an ETA for this.
-
Guillaume commented
ETA for this feature? We are in 2022 and it is difficult to understand why, such an important and critical feature, is not yet available.
-
I Putu Yoga commented
AWS AppSync has this. That would be great if Realm GraphQL supports this.
-
Petru commented
Would be great if this would be offered out of the box as it is a common pattern/solution in many use cases.
-
Colin commented
This is business critical for us as well first and offset would work well with most graphql clients. Here is the article on pagination from GraphQL Docs https://graphql.org/learn/pagination/
-
Yuriy commented
Hi Quinton,
I have been advised of a workaround including writing GraphQL Custom Resolver and function which accepts find and limit parameters.
However I still believe this has to be out of the box feature.
Regards