Graphql total count products?

Anonymous
Not applicable
1887 0 0

Hi

Is there a field to get the total count of the products in my store?

0 Likes
Vellir
Shopify Partner
133 29 34

I was recently looking for the same thing in the GraphQL API and couldn't find so I had to use the REST one:

curl --location --request GET '{YOUR_STORE_URL}/admin/api/{API_VERSION}/products/count.json' \
--header 'Content-Type: application/json' \
--header 'X-Shopify-Access-Token: YOUR_TOKEN'

 

https://shopify.dev/docs/admin-api/rest/reference/products/product#count-2021-01 

- Yes, we build Shopify Apps. Hit me with your idea: https://vellir.tech
- Let customers preview your products and easily add them to cart with Peek Mode
- Add free, good looking social share icons with built-in analytics to your store with Share Lab
- Manage your new arrivals with Newr
0 Likes
hmanlig
Tourist
5 0 1

This is using the REST api, not GraphQL?