This issue is very similar to this one [Bug][Admin GraphQL] updateOrder fails with “Order tags is invalid”
First of all, Shopify’s docs are a bit confusing. It marks tags as [String!], docs here
Input scheme also marks tags as an array of strings:
This is what GraphQL docs says about brackets and ! symbol:
We can use a type modifier to mark a type as a List, which indicates that this field will return an array of that type. In the schema language, this is denoted by wrapping the type in square brackets, [ and ]. It works the same for arguments, where the validation step will expect an array for that value.> > The Non-Null and List modifiers can be combined. For example, you can have a List of Non-Null Strings:
myField: [String!]
But if you at the variables, tags looks like a plain string:
Maybe it should be?
tags: [] # empty array
instead of
tags: "" # plain string
I wonder.
There’s also this example on how to update customer’s tags. Tags are an array with a single plain string comma-separated
tags: ["Test tag, New tag"]
instead of an array of strings
tags: ["Test tag", "New tag"]
I’m using the official ruby gem. I generated a scheme from 2021-10 version and I also found another description of what tags could be (though this is related to SubscriptionDraft):
![]()
I wonder what Shopify understands by “a comma-separated list”. By definition, it should be
tags: ["Test tag", "New tag"] # array of strings
But in the docs, tags could be something else.
And finally, here’s the error I’m getting when trying to update customer’s tags by using those 2 tags formats:
tags: ["Test tag", "New tag"] # array of strings
tags: "Test tag, New tag" # plain string, something like array.join(", ")
The query was performed with these variables:
{:input=>{:id=>"gid://shopify/Customer/customer_id", :tags=>"Smile VIP - Gold"}}
I don’t know what make a tag invalid, what’s wrong with the tags, or if I should try the third option - pass the tags as a
tags: ["Tag 1, tag 2"] # array of string with single element
When I was passing tags as an array of strings, 100% of the mutation failed. Passing as a plain string, a few mutations work and a few, fail.
I’d like to add that, via Postman, I was able to update the customer’s tag using either of the 3 formats. But in production environment, Shopify’s GraphQL API will just throw this invalid tag error.
Appreciate if somebody could clarify why this error is happening and how tags should be passed.




