Hello everyone,
I am currently in the process of updating metafields for a client’s order. However, I have encountered an issue with GraphQL, which is returning an “Invalid id” error when I attempt to execute my query mutation.
Query :
mutation metafieldsSet($metafields: [MetafieldsSetInput!]!) {
metafieldsSet(metafields: $metafields) {
metafields {
namespace
}
userErrors {
field
message
}
}
}
variables :
{
"metafields": {
"namespace": "[custom_namespace]",
"key": "documents_1",
"value": "https://[custom_namespace]/document_1.pdf",
"ownerId": "gid://shopify/Metafield/xxxxxxxx",
"type": "url"
}
}
I have come across another developer who appears to be facing an almost identical issue, as documented in the following discussion thread:
Interestingly, I have found that the REST API functions flawlessly in this regard.
Here a request ID : 211c55d9-aa47-4a4b-86a7-5399c1cb1643
I would greatly appreciate your assistance with resolving this matter.
Thank you for your help