Hi, I’m trying to add some tags to a product via productUpdate and I’m running into the problem that no matter what I pass is doesn’t fail but the tags are not updated.
I’m sending this:
mutation {
productUpdate(input: {
id: "gid://shopify/Product/${id}",
title: "${data.title}",
descriptionHtml: "${data.descriptionHtml}",
metafields: [{
key: "mainmaterial",
namespace: "my_fields",
value: "${data.metafields.mainmaterial}"
}],
tags: ["Hest","Fisk"]
}) {
product {
id
descriptionHtml
images(first:50) {
edges {
node {
id
src
}
}
}
tags
metafields(first:10) {
edges {
node {
namespace
key
value
}
}
}
}
}
}
And I’m getting this in return:
{
id: 'gid://shopify/Product/7214229487809',
descriptionHtml: '...',
images: {
edges: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object]
]
},
tags: [],
metafields: { edges: [ [Object] ] }
}
As you can see “tags” returns blank and I’ve confirmed in the admin section on the product that no tags have been added.
I’ve tried:
tags: [“Tag1, Tag2, Tag3”]
tags: [“Tag1”,“Tag2”,“Tag4”]
tags: “Tag1, Tag2, Tag3”
tags: “["Tag1", "Tag2", "Tag3"]”
Nothing seems to take and I don’t get any error messages, except for the bottom one.
Any help is appreciated.