lightward/mechanic-tasks

Update "Hide out-of-stock products" query to filter by inventory level

Closed this issue · 1 comments

https://tasks.mechanic.dev/hide-out-of-stock-products

Shopify's QueryRoot.products connection supports filtering by inventory_total (docs)! Was this always the case and I just didn't know it? 🤪

The change is tiny but significant for query efficiency, I'm just pressed for time at the moment so it's easier to record this for later:

Screen Shot 2022-10-22 at 1 33 02 PM

For copy/paste purposes:

query: "inventory_total:<={{ options.out_of_stock_inventory_quantity__number_required }}"

With apologies to the community, the following link is for our internal tracking purposes:

https://secure.helpscout.net/conversation/2045387705/59935/