"invalid id" error when trying to update product's metafields

Sprockets
Visitor
1 0 0

Hello, so I created some metafields and have retrieved the ids for them successfully

query {
    metafieldDefinitions(ownerType: PRODUCT, first:10) {
        nodes {
            id
            key
        }
    }
}
 
{
                    "id": "gid://shopify/MetafieldDefinition/XXXXXXXXX",
                    "key": "category"
                },
                {
                    "id": "gid://shopify/MetafieldDefinition/YYYYYYYYYY",
                    "key": "subcategory"
                }
But when I try to update them like below I get an error
 
mutation productUpdate($input: ProductInput!) {
productUpdate(input: $input) {
product {
id
metafields(first: 10) {
edges {
node {
namespace
key
value
}
}
}
}
userErrors {
field
message
}
}
}
 
{
"input": {
"id": "gid://shopify/Product/ZZZZZZZZZZ",
"metafields": [{
"id": "gid://shopify/MetafieldDefinition/XXXXXXXXX",
"value": "Exterior"
},
{
"id": "gid://shopify/MetafieldDefinition/YYYYYYYYYY",
"value": "Bumpers"
}]
}
}
 
"errors": [
{
"message": "invalid id",
"locations": [
{
"line": 3,
"column": 3
}
],
"path": [
"productUpdate"
]
}
]
 
 any ideas why?
Replies 0 (0)