cur8d
November 27, 2019, 8:20pm
1
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.\nRequest ID: 5a1a1e9c-a22c-4629-84f4-a9f6578b3eec (include this in support requests).
Can someone take a look?
Thanks,
Sameer.
Mind sharing the exact mutation query you are pushing to the endpoint? Also, are you doing this from the GraphQL app or client code?
cur8d
November 27, 2019, 10:23pm
3
This request/response below is from a GraphQL Client but I get the same error when using client code as well.
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":0
}
],
"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"
}
]
}
]
}
}
Response:
{
"errors": [
{
"message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 87da9de6-8e8a-441e-bdcf-f5cb2413522e (include this in support requests)."
}
]
}
cur8d
December 2, 2019, 7:35pm
4
Can someone from Shopify support team please help?
cur8d
December 14, 2019, 9:29am
5
Still having troubles with this.