How to include uninstall reason and description in Shopify partner API?

Topic summary

Core issue: Retrieve Uninstall Reason and Description for app removals via Shopify Partner API.

  • Attempted approach: GraphQL query to app.events(types: RELATIONSHIP_UNINSTALLED) including a reason field on node (AppEvent).
  • Result: API error — “Field ‘reason’ doesn’t exist on type ‘AppEvent’,” indicating the schema for AppEvent does not expose a reason field.

Context and implications:

  • The provided code snippet is central; it targets uninstall events correctly but requests a non-existent field.
  • No alternative fields or documented path to “reason”/“description” are identified in the thread.

Latest update:

  • Another participant reports the same issue and asks if a solution exists.

Status and open questions:

  • Unresolved. It’s unclear whether uninstall reasons are available in the Partner API or exposed under a different type/field.
  • Key unanswered question: Is there any supported way (field, event type, or endpoint) to access uninstall reason/description for app events?

Notes:

  • Understanding: GraphQL schema must define fields; requesting undefined fields yields errors, as seen here.
Summarized with AI on January 9. AI used: gpt-5.

I’m using Shopify partner API and need to include Uninstall Reason & Description. How can I get this data? I’m using the below query but it gives an error msg. Kindly help!

query AppUninstalledEvents($cursor: String) {
  app(id: "gid://partners/App/793214977") {
    events(types: RELATIONSHIP_UNINSTALLED, before: $cursor, last: 100) {
      edges {
        cursor
        node {
          app {
            name
            id
            apiKey
          }
          occurredAt
          type
          shop {
            id
            name
            myshopifyDomain
          }
          reason
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
    }
  }
}

Error Msg:

{
  "errors": [
    {
      "message": "Field 'reason' doesn't exist on type 'AppEvent'",
      "locations": [
        {
          "line": 19,
          "column": 11
        }
      ],
      "path": [
        "query AppUninstalledEvents",
        "app",
        "events",
        "edges",
        "node",
        "reason"
      ],
      "extensions": {
        "code": "undefinedField",
        "typeName": "AppEvent",
        "fieldName": "reason"
      }
    }
  ]
}

Have you gotten the reason to uninstall the app yet? I’m having the same problem as you, please help me