A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi all,
I noticed in the docs that to get the product listings count, we need to use the rest client to make a call to `product_listings/count` endpoint.
However, I am using graphQL and was wondering what is the equivalent graphql query for this operation?
Thank you!
Jon
Solved! Go to the solution
This is an accepted solution.
For now, yes. I've raised this issue internally.
Scott | Developer Advocate @ Shopify
Hey @bovojon
Unfortunately there's no total count field in the GraphQL API.
Scott | Developer Advocate @ Shopify
Hi @SBD_, thank you. So I have no other choice but to create a Rest client and get this detail through it?
This is an accepted solution.
For now, yes. I've raised this issue internally.
Scott | Developer Advocate @ Shopify
With the latest deprecation of the REST products api, what is the suggested migration solution for getting the product count?
Hi @JoshHighland,
I've provided a solution to retrieve the product count via GraphQL in the other thread you posted in, but I will link it here as well in case anyone else is following along in this thread and would like a solution to retrieve the product count via the GraphQL Admin API as well.
I hope this helps, and I hope you have a great day 🙂
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog