inventory_policy Parameter Is Ignored In Shopify GraphQL Query

inventory_policy Parameter Is Ignored In Shopify GraphQL Query


0

I am running a query to Shopify’s GraphQL, looking for all variants that have 0 or less in stock and have CONTINUE as its inventory policy.

{
  productVariants(
    first: 100
    query: "inventory_policy:CONTINUE AND inventory_quantity:<=0"
  ) {
    nodes {
      inventoryPolicy
      product {
        title
      }
      title
    }
  }
}

The query is tested and works in all ways but the ignored query.

It does filter by inventory_quantity correctly, but ignores the second query, returning variants both with inventory_policy CONTINUE, and DENY.

I’ve tried using CONTINUE, continue, or Continue.
I’ve tried setting the parameter as inventoryPolicy instead of inventory_policy.
I’ve tried removing the quantity parameter, only querying "inventory_policy:CONTINUE".
The query does return the inventoryPolicy, and its content is either "DENY" or "CONTINUE"

New contributor

Benjamin Antoni Andersen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 5 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *