add GraphQL API to get products count

add GraphQL API to get products count

ecoworkhome
Shopify Partner
3 0 3

There is a RESTful API to get products count by query: 

https://shopify.dev/docs/api/admin-rest/2024-01/resources/product#get-products-count

 

We are using the API the preview the product count selected by customer, it is very useful.

Please consider to add the API in GraphQL API.

 

Thanks

Product Engineer
Replies 6 (6)

SBD_
Shopify Staff
1829 272 417

Thanks @ecoworkhome. Agreed, that would be handy. Passing along your feedback!

Scott | Developer Advocate @ Shopify 

HunkyBill
Shopify Partner
4853 60 558

I have been writing Apps since the first API was released, and I still use this feature as part of my logic. I need to know how many products are in a store before I do certain sync operations. Making a quick call to count() was great. Now that the brainiacs have decided that is too expensive, what are we left with? Does Shopify seriously expect me to do a bulk export of an entire store to get started, and then babysit each and every delete and create myself to keep that number current?

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
JoshHighland
Shopify Partner
213 12 76

Killing the REST api for products and not having a simple count is crazy. I depend on it and I'm guessing a ton of other apps do also!

SEO Manager - The all-in-One SEO solution for Shopify
A powerful suite of SEO tools that gets you found in Google results

- Install SEO Manager -
HunkyBill
Shopify Partner
4853 60 558

I figured it out. There is a new GQL endpoint in 2024-04 that works as a substitute. It is accurate up to 10000 and after that you have to deal with the concept that there are more than 10000. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Tester5
Shopify Partner
7 0 3

Hello Hunky Bill,

But how to manage for a store which contains more than 10,000 products then how can we get total products count via graphql API as now REST API > count.json is deprecated.

Can you please guide us ASAP?

mannenson
Shopify Partner
20 1 10

Any progress on this?

For how long will the Count work for the rest api as I read you are deprecating the /product endpoint on rest api.