How to get product with tags contain "variant:" by graphql query syntax

How to get product with tags contain "variant:" by graphql query syntax

jacksonlin
Visitor
1 0 0

Hi, i want to get product data using graphql api, this is my query.

I want to get products with tags contain "variant:" as prefix, but it not worked.

Can anyone help me? Thank you!

 

{
  products(first: 10, query: "tag:'variant:'*") {
    edges {
      node {
        id
        tags
      }
    }
  }
}

 

or

 

{
  products(first: 10, query: "tag:variant:*") {
    edges {
      node {
        id
        tags
      }
    }
  }
}

 

both of them not working

Reply 1 (1)

JohnWF
Shopify Partner
16 0 8

Just adding that I'm wondering the same thing. I do expect we'll need to escape the :, e.g. `tag:variant/:*`, but beyond that my query is returning a lot less products than it should.