Unable to create app-owned metaobject with metaobjectUpsert

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 96670ff7-be06-4341-93a0-59804e169143-1759942847 (include this in support requests).",
      "extensions": {
        "requestId": "96670ff7-be06-4341-93a0-59804e169143-1759942847",
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ],
  "data": null
}

I can’t create an app-owned metaobject with metaobjectUpsert (version 2025-10).

mutation UpsertMetaobject($handle: MetaobjectHandleInput!, $metaobject: MetaobjectUpsertInput!) {
  metaobjectUpsert(handle: $handle, metaobject: $metaobject) {
    metaobject {
      handle
      fields {
        key
        value
      }
    }
    userErrors {
      field
      message
      code
    }
  }
}
{
  "handle": {
    "type": "$app:test",
    "handle": "test-handle"
  },
  "metaobject": {
    "fields": [
      {
        "key": "addons",
        "value": "[]"
      }
    ]
  }
}

Does your metaobject type test-handle, match an existing definition?
You’ll need to create the metaobject definition first metaobjectDefinitionCreate - GraphQL Admin

Hi @IndieDev,

I can confirm that what @JordanFinners mentioned above is correct, in that you do need to have an existing metaobject definition that matches the type you are passing in the metaobjectUpsert mutation.

Reviewing the call from the x-request-id provided, it looks like the input variables from this call is actually different from the test-handle example variables you shared above.

Reviewing the call internally, I can confirm that the type that you passed for the call with request id: 96670ff7-be06-4341-93a0-59804e169143-1759942847, does actually exist with a matching metaobject definition on the store in question.

I’ve found the error occurring internally, however I’m unsure of the cause at this time and I will be discussing this with our developers further.

We will be sure to follow up and share any updates on this issue in this thread, as we look into this further.

Hi @IndieDev,

I’ve looked into this further with our developers, and this appears to be due to some unexpected behaviour where the metaobjectDefintion was deleted and recreated, without the associated metaobjects getting deleted as well, leading to some orphaned metaobjects causing this error.

We can help fix this further on our end, however we will need you to reach out to the Shopify Support Team directly via the Shopify Help Center, while logged into your Partner Account, or Staff Member Account on the store in question, for us to fully authenticate you with this store before we can make any updates to fix this.

I will be reaching out to you via DM as well, so you can provide me with the ticket number you receive after reaching out to Shopify Support, so I can share notes internally on the ticket for the Developer Support Specialist that receives this so they have the full context of what we’ve looked into so far.