Remove tag from an order using Graphql API

poojafmile
Shopify Partner
22 1 0

Hello, 

I have tagged my all my orders using a specific tag, but am writing an app and if one order  satisfies certain criteria, the tag should be remove from that particular order.  Can someone please tell me how to do it when using Graphql queries ?

Thanks 🙂

Reply 1 (1)
c10s
Shopify Partner
65 12 13

Fetch each order and check for your condition, if it matches you can remove the tag with the orderUpdate mutation: https://shopify.dev/docs/admin-api/graphql/reference/orders/orderupdate