The productUpdate mutation is failing when the update request has metafields at the ProductVariant level. It works fine without the metafields.
I get the following error. Internal error. Looks like something went wrong on our end. Request ID: ec9a0db6-fad8-4c56-a251-3873429b2c82 (include this in support requests).
API Request:
mutation ProductUpdate($input: ProductInput!) {
productUpdate(input: $input) {
product {
id
createdAt
updatedAt
handle
title
metafields(first: 10) {
edges {
node {
id
key
namespace
value
valueType
}
}
}
totalInventory
variants(first: 1) {
edges {
node {
id
createdAt
updatedAt
barcode
sku
inventoryQuantity
inventoryItem {
id
createdAt
updatedAt
sku
tracked
locationsCount
}
metafields(first: 10) {
edges {
node {
id
key
namespace
value
valueType
}
}
}
}
}
}
}
userErrors {
field
message
}
}
}
{"input": {
"id":"gid://shopify/Product/4269148242001",
"title":"Bataleon Omni MALE 154 Snowboard",
"vendor":"Bataleon",
"productType":"snowboards",
"metafields":[
{
"id":"gid://shopify/Metafield/11032304287825",
"key":"groupingKey",
"namespace":"products",
"value":"8719638710183",
"valueType":"STRING"
}
],
"variants":[
{
"barcode":"8719638710183",
"sku":"BATALEON-10.20.OMN.154",
"inventoryItem":{
"cost":"317.97",
"tracked":true
},
"inventoryQuantities":[
{
"locationId":"gid://shopify/Location/24044666961",
"availableQuantity":10
}
],
"price":"529.95",
"compareAtPrice":"529.95",
"metafields":[
{
"id":"gid://shopify/Metafield/11032304222289",
"key":"attr:genderPreference",
"namespace":"products",
"value":"MALE",
"valueType":"STRING"
},
{
"id":"gid://shopify/Metafield/11032304255057",
"key":"map",
"namespace":"products",
"value":"529.95",
"valueType":"STRING"
}
]
}
]
}
}
API Response:
{
"errors": [
{
"message": "Internal error. Looks like something went wrong on our end.\nRequest ID: ec9a0db6-fad8-4c56-a251-3873429b2c82 (include this in support requests)."
}
]
}