Issue with products query when trying to filter by empty product_type AND tag

DanAtBonify
Shopify Partner
49 3 27

I am trying to filter products that DO NOT have a product_type set (empty) and that has a specific tag. Example query:

 

{
  products(first: 10, query: "tag:testing_this_out AND NOT product_type:*") {
    edges {
      node {
        title
        productType
        tags
      }
    }
  }
}

That query does not return valid products.

 

Other attempts, testing with two products, one that SHOULD show up, and another product that should NOT show up.

 

  • tag:testing_this_out
    • Good: Returns 2 products as expected.
  • tag:testing_this_out AND NOT product_type:*
    • Returns 0 products.
    • Expected 1 product returned.
  • tag:testing_this_out AND product_type:''
    • Returns 0 products.
    • Expected 1 product returned.

 

So at this point I am not sure how to do this...

Reply 1 (1)
DanAtBonify
Shopify Partner
49 3 27

Can someone from Shopify confirm if bug or feature?