Apps write through the Admin API with mutations. metafieldsSet writes metafield values onto whatever the ownerId points at.
Mutations fail in two layers. A bad token or a malformed query fails loudly. A business-rule failure (an invalid type, a bad ownerId) comes back as HTTP 200 with the problem in a userErrors array. If the mutation doesn't select userErrors, failure looks identical to success.
{
"data": {
"metafieldsSet": {
"metafields": [],
"userErrors": [
{
"field": ["metafields", "0", "type"],
"message": "Type must be a valid metafield type: \"string\" is not a valid type."
}
]
}
}
}
That's a 200 response for a write that did nothing. Also check the type: it must be a real metafield type name like single_line_text_field, the names from the admin's Metafields and metaobjects screen. string and text don't exist.
AI tell: a mutation that omits userErrors and passes a made-up type is still valid GraphQL. The schema checks shapes; userErrors carries the verdict.