When an app that creates metaobject definitions via the GraphQL Admin API (metaobjectDefinitionCreate) is uninstalled, the definitions remain on the store but become completely inaccessible.
I’m aware this has been reported before (here and here), but the commonly suggested workaround of “reinstall the app and delete via API” does not actually work.
Why reinstalling doesn’t help:
When an app is reinstalled, Shopify assigns it a new installation ID. The original definitions were created under the old ID (e.g. app–328751644673–sc_campaign), but the reinstalled app now operates under a different ID (e.g. app–328751513601–sc_campaign). As a result:
metaobjectDefinitionsquery does not return the old definitionsmetaobjectDefinitionByTypereturnsnullfor the old type- The reinstalled app has no way to reference or delete the orphaned definitions
This is true even when using the Shopify GraphiQL app - the definitions are completely invisible to all API tokens.
The real-world impact:
The orphaned definition has an onlineStore capability with URL handle “awards”. Our production app (a separate Shopify app) now cannot create its own campaign definition with the same handle, failing with URL_HANDLE_TAKEN. There is no way to release that handle.
The definitions are visible in the admin under Settings → Custom data, but the merchant cannot delete them because they are app-owned.
Expected behaviour:
At minimum one of the following:
- Reinstalling the same app should allow managing definitions created by the previous installation
- Store owners should be able to delete orphaned app-owned definitions from the admin after the app is uninstalled
- GraphQL-created definitions should be cleaned up on uninstall, same as TOML-managed definitions
Can Shopify assist with manually removing these from our store?