Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total product count in collection for paging #221

Closed
snapcoyote opened this issue Sep 11, 2016 · 3 comments
Closed

Total product count in collection for paging #221

snapcoyote opened this issue Sep 11, 2016 · 3 comments

Comments

@snapcoyote
Copy link

Can the total product count be added to the collection model or product array so paging can be implemented? When I query the products in a collection with optional parameters for page / limit, I get back the limit number of products without knowing the max total available. I don't know how many pages are available in the collection for me to display it in the front end. Thoughts?

@minasmart
Copy link
Contributor

Hey there! This is a limitation of our API. Pagination in our system is a non-trivial problem. We're working on adding better meta data around paginated sets, but it'll be some time before we're able to expose it through the SDK.

I'm sorry I don't have a better answer at the moment. We know it's a sought after feature, and it is being worked on.

Thanks for your interest, and sorry I couldn't help more!

@snapcoyote
Copy link
Author

Thanks for your response! Looking forward to the feature once it is available.

@Januszpl
Copy link

@minasmart any updates on having product total count when requesting products by collection ?
https://graphql.org/learn/pagination/

Could you also give more details what kind of problem you have with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants