How to use metafield value/ dynamic value on hasAnyTag

query Input {
  cart {
    buyerIdentity {
      customer {
        hasAnyTag(tags: ["vip"])
      }
    }
  }
  discountNode {
    metafield(namespace: "$app:order-discount", key: "function-configuration") {
      value
    }
  }
}

Here hasAnyTag has a hardcoded tag vip.
I want to use dynamic tags here so that customers can set their own tags.
Can I use the Metafield value here?

Hi Ifat802,

Have you looked into using variables in input queries - it sounds like this is what you’ll need for using metafields in this context.

Hope this helps!

1 Like

Thanks, @Liam . I have figured out the solution.

Great to hear!

1 Like