A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I am investigating an issue with addTags where tags are not added. There is no automation or app that could be removing the tag. I thing it has to do with having spaces in the tags name because if I change the tag to something trivial like "test" it works.
Here is the mutation:
mutation {
tagsAdd(id: "gid://shopify/Product/7531788730592", tags:["Gemstone: Turquoise"]) {
node {id, __typename}
userErrors {
field
message
}
}
}
Here is the request id: 787b0312-61cf-41c5-9a60-6a12fa501495
Any help would be appreciated.
Hi @milann . It could be the special characters thats causing the issue here. https://help.shopify.com/en/manual/products/details/tags#:~:text=Characters%20%2D%20Use%20only%20ord....
It's best to avoid using special characters e.g the colon : in this case when creating tags. If you test without those it should process correctly.
KB77 | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@KB77 @ That is absolutely unsatisfactory answer as users are allowed to enter tags with special characters using the admin and they expect application to be able to do that as well. Also, if that was not allowed I would expect the API to return an error. There must be a better answer.
Hi @milann I see this was also asked to our partner support which included some store specific information. You should have a response from that team with more clarification in your email shortly.
KB77 | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog