in the latest api version namespace and key fields are mandatory, so I continue to get
message": “Key must be unique within this namespace on this resource”
. Unable to update public metafield using productUpdate mutant.
{
“query”: “mutation productUpdate($input: ProductInput!) { productUpdate(input: $input) { product { id handle } userErrors { field message } }}”,
“variables”: {
“input”: {
“id”: “gid://shopify/Product/XXXXX967638075”,
“metafields”:
{
“id”: “gid://shopify/Metafield/XXXXX2443”,
“namespace”:“my_fields”,
“key”:“product_extra_info”,
“type”:“json” ,
“value”: “{\r\n "$id": "1",\r\n "colour": "Rose Gold"}”
} } }}