GraphQL API issue: pull published products

Highlighted
Shopify Partner
31 0 3

Hi folks,  I am having issue with pulling products that published in Online Store. 

 

I am running query in this store and there is bunch Sold Out(inventory == 0). I am on this API version - 2020-04

https://sheseelady.com/collections/from-usa

 

Here is the query. 

 

{
 products(first:250, query:"inventory_total:<=0 published_status:published", ) {
    pageInfo {
        hasNextPage
    } 
    edges {
     cursor
     node {
        id
        title
        tracksInventory
        totalInventory
        publishedAt
        # tags
     }
    }
 }
}

 

 

 

Result:

 

Postman 2020-06-04 13-45-13.png

0 Likes
Highlighted
Tourist
14 0 2

From the documentation here, it doesn't looks like the inventory_total is a supported query.

I guess you would need to filter these once you get the results...

International team available for Store creation and Theme/App development!
0 Likes
Highlighted
Shopify Partner
31 0 3

It worked before. Also I checked other stores and it seems it is working for them.  

0 Likes
Highlighted
Tourist
14 0 2

Have you tried total_inventory instead of inventory_total ? Just a guess as the variable name in GraphQL is totalInventory.

International team available for Store creation and Theme/App development!
0 Likes