Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

GQL addTags does not add tags

GQL addTags does not add tags

milann
Shopify Partner
11 0 1

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.

Milan
Founder @ Tag Genie - Best Tag Management App for Shopify
Replies 3 (3)

KB77
Shopify Staff
59 6 11

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

milann
Shopify Partner
11 0 1

@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. 

Milan
Founder @ Tag Genie - Best Tag Management App for Shopify
KB77
Shopify Staff
59 6 11

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