How to uninstall app using GraphQL

I am in process of migrating all REST APIs to GraphQL and I am unable to find a equivalent of the DELETE request to https://{shop}.myshopify.com/admin/api_permissions/current.json in GraphQL.

Anyone have an idea how to uninstall Shopify app using GraphQL

Hi Vladimir,

There is an uninstallUrl field on the appInstallation query, which you can then use to uninstall the app, eg:

query GetUninstallUrl {
  appInstallation(id: "gid://shopify/AppInstallation/688276949") {
    uninstallUrl
  }
}

But there’s no direct mutation that will perform this action.

Hi there,

anyway, the ‘https://{shop}.myshopify.com/admin/api_permissions/current.json’ endpoint is not documented in the REST API, and indeed that endpoint it is not a Shopify REST API endpoint (because it is not versioned).

In fact, it is documented in a different API:

So, as far as I know, there is no need to migrate it to GraphQL. Am I right?

Hello Liam,

I ran the graphql, and the returned url is empty.

{ appInstallation: { uninstallUrl: null } }

Do you know what is the relationship between uninstallUrl and https://{shop}.myshopify.com/admin/api_permissions/current.json endpoint? And there is no need to migrate this endpoint to GraphQL, right?

I think @Emarsys_Marketing_Pl wants to uninstall the app via GraphQL.

Currently, Shopify’s GraphQL Admin API does not include a specific mutation or query that does same functionality.

1 Like