I want to run this GraphQL query to bulk upload metafields:
mutation {
bulkOperationRunMutation(
mutation: """
mutation call($definition: MetafieldDefinitionInput!) {
metafieldDefinitionCreate(definition: $definition) {
createdDefinition {
key
namespace
ownerType
}
userErrors {
field
message
code
}
}
}
""",
stagedUploadPath: "stagedUploadPath"
) {
bulkOperation {
id
url
status
}
userErrors {
message
field
}
}
}
But I’m getting this error:
{
"data": {
"bulkOperationRunMutation": {
"bulkOperation": null,
"userErrors": [
{
"message": "You must use an allowed mutation name.",
"field": [
"mutation"
]
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1990,
"restoreRate": 100.0
}
}
}
}
How can I solve this error?