When sending ProductUpdate GraphQL request and changing only one property of the “meta” object (ie title/description), the field is beign updated (as expected) but the other one resets to null
State before the update:
POST /admin/api/2023-04/graphql.json
query Query($productId: ID!) {
product(id: $productId) {
seo {
title
description
}
}
}
{"productId": "gid:\/\/shopify\/Product\/6870188425403"}
// Returns
// "data": {
// "product": {
// "seo": {
// "title": "AAA",
// "description": "BBB"
// }
// }
// }
The update:
POST /admin/api/2023-04/graphql.json
mutation ProductUpdate($input: ProductInput!) {
productUpdate(input: $input) {
product {
id
seo {
title
description
}
}
}
}
{"input":{"id": "gid:\/\/shopify\/Product\/6870188425403","seo":{"title": "New Title"}}}
// Returns
// "data": {
// "productUpdate": {
// "product": {
// "id": "gid://shopify/Product/6870188425403",
// "seo": {
// "title": "New Title",
**// "description": null**
// }
// }
// }
// },