Closed adha8911 closed 4 months ago
@adha8911 The documentation you found is the correct although it looks like it doesn't mention that the pagination feature is its own supplemental package to apollo-ios
, you will need to include the apollo-ios-pagination
package via SPM as well to get access to the GraphQLQueryPager
, once you've done that the documentation page you linked (and the few others associated to pagination) should give you the info you need to get up and running.
I will make a small update to the documentation to make sure to callout that pagination is its own package.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.
Question
I'm currently working on implementing pagination in my iOS application using Apollo for GraphQL queries. I came across the Apollo iOS documentation on pagination, which mentions a GraphQLQueryPager for handling pagination. However, I am unable to find any reference or implementation details about GraphQLQueryPager in the Apollo iOS SDK.
Could someone provide guidance or examples on how to properly implement GraphQLQueryPager for pagination in Apollo iOS? Specifically, I'm looking for:
An example of how to set up and use GraphQLQueryPager for paginating through a list of items. Any required configurations or setup steps that I might be missing. Alternative approaches to handle pagination if GraphQLQueryPager is no longer supported or available.
https://www.apollographql.com/docs/ios/pagination/introduction#using-a-graphqlquerypager
Here are some details about my setup:
I am using the latest version of Apollo iOS via Swift Package Manager (SPM). I have imported the Apollo package successfully in my project.