That is because there is no exact mention on the page that this has to be created separately in the backend. However, it makes sense. Does apollo at least provide an example showing how this would work? It isn’t exactly intuitive.
Thanks for calling this out @redderick2. This style of cursor/connection based pagination was made popular in the GraphQL space by Relay, and is outlined in their GraphQL Cursor Connections Specification doc. We mention this a bit further down in the docs, but we could be more clear about this overall so we’ll get things adjusted.
Thank you. I’d love to see an example, even if it is using prefilled data, it would make a night and day difference. So far I love everything the apollo community is doing and thank you guys for making such a great service.
Hello Team and @hwillson , I was going through the docs and had a query related to Cursor based pagination, I checked that there is already an existing query related to this and hence wanted to pitch in.
I have seen some of the graphQL-java implementations are also supporting this. I couldn’t find a sample example here and thought of checking whether the concept of wrapping it in Edges and PageInfo attributes is also supported in Apollo Client for Kotlin.
If yes then i would really appreciate if some-one can provide a sample on how to use it using Apollo Kotlin Client.
This usually works well albeit a bit verbose. Can you point to the existing graphql-java sample you were mentioning? Maybe I can point you to the good direction?
Thank You @mbonnin for sharing the details, i was searching the docs in Apollo Client and found Cursor based pagination in Apollo React Client but the same example i couldn’t find in Pagination section for Apollo Kotlin Client .
I have seen this being supported in DGS Framework as well as in graphql-java-codegen.
If you’re looking for Normalized Cache stable keys like their Apollo Client counterparts then we unfortunately don’t have anything like that just yet in Apollo Kotlin (but there are plans to!)
As far as DGS Framework and graphql-java-codegen are concerned, these are mostly server frameworks. So they are working quite differently and I don’t think it applies to Apollo Kotlin? Or did you have something specific in mind?
Hi @mbonnin i was evaluating if i can use Apollo client in Java and so far i really liked the set of features that Apollo Client support.
To evaluate the exhaustive set of functionality, i was comparing it with how can i leverage the features described in GraphQL Server spec.
Most of our use-case is Java based and based on the documentation, i think we can use it by generating Java Classes, I came across the pagination feature and looked at how it has to be used then came across GraphQL cursor connection spec to see what has been supported in Apollo Kotlin Client.
Can you share the information or documents if any about how the existing users use it on Java Platform. I would be really happy to explore more about it and if possible to contribute to something.
Please do let me know if you want me to raise a new query on forum rather than using this one.
This was closely related to something i was exploring so pitched in right here but at the broader level would like to know how users use it in Java ?
Version 3 is focused at Kotlin and while it’s usable from Java, some of the APIs are less idiomatic. We’re planning to improve this, you can follow this issue for updates.
Hi @mbonnin, i am evaluating the android version 2.x client, so far its looking good, is there any functionality or performance difference between version 2 and version 3, if there are any can you please share the details a bit.
You can read about what’s new in version 3 in this blog post. A lot of the changes are for Kotlin APIs and multiplatform support so from Java you shouldn’t miss much. There are a few other, in particular reading from the SQL cache has been sped up a bunch and there’s support for new directives.
I’m look for some advice on cursor based pagination with Apollo iOS for scrolling views (im actually on desktop Mac).
Are there good examples that show driving a data source driven collection view with paginated items, responding to scroll events and delegate methods to fetch the next or previous cursor correctly?