Query with more than one param doesnt work

Hi,

I am trying to fetch products which have positive inventory quantity among the list of product ids.

But my query below does not return any results.

{
        productVariants(first: 10, query: "(inventory_quantity:>0) AND (product_ids:7483474804973,7483550007533)") {
            edges {
                node {
                    id
                    image {
                        url
                    }
                    product{
                        id
                    }
                    availableForSale
                    inventoryQuantity
                    price
                    selectedOptions {
                        name
                        value
                    }
                }
            }
        }
        }

But if i would run the above query with either inventory condition or product_ids only, then i get results.

What am i doing wrong here?

Big thanks for help.

Hi Nikhilyayloh

Can you try:

query: "(inventoryQuantity:>'0') AND (product_ids:xxxx,xxxx)")

The above worked when I tested in the graphiql app.

Hi Liam,

It might execute and give results but if you increase the inventory value from 0 to say 100K, you will see that it doesnt filter out data. So that condition itself is not used. Plus inventory_quantity is the query field mentioned in the documentation.

I see what you mean - other filters like vendor appear to work as expected alongside product_ids but inventory_quantity is not - I’ll dig into this a bit more.

Hi Nikhilyayloh,

We’ve identified this is a bug on our side and will be shipping a fix asap.

Hi,

Is there a timeline for this fix?

Hey @nikhilyayloh ,

Thanks for checking in. The issue hasn’t been resolved as of yet. Currently we don’t have firm deadline or timeline for a fix but it is still on the radar with our development teams.

Kind Regards,

  • Kyle G.