I want to automate the Product MetaField update.
- I have a Product meta field definition which is “Single line text (List)”
- I have some values added
My request for two provided values passes perfectly, but I don’t see changes on Shopify Product.
I was following documentation: https://shopify.dev/docs/apps/custom-data/metafields/manage-metafields
Step 3: Update a meta field; the example was with STRING only.
The first question is - Does this endpoint support arrays?
Second question - Even if the string is provided exactly as in the example (single value) - it passes, but also no changes are visible on the product. Is it possible to update the meta field which is “Single line text (List)” with this method?
mutation {
productUpdate(
input : {
id: "gid://shopify/Product/xxxxxxxx",
metafields: [
{
id: "gid://shopify/Metafield/xxxxxxxxxx",
value: "[\"Rich\", \"Tan\"]"
}
]
}) {
product {
metafields(first: 99) {
edges {
node {
namespace
key
value
}
}
}
}
}
}