What is the Graphql query to get the equivalent of product_listings/count?

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

Hey @bovojon

Unfortunately there’s no total count field in the GraphQL API.

Hi @SBD , thank you. So I have no other choice but to create a Rest client and get this detail through it?

For now, yes. I’ve raised this issue internally.

Thank you so much, @SBD :folded_hands:t2:

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 :slightly_smiling_face: