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

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

deepika_meyan
Shopify Partner
1 0 0

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"
      }
    }
  ]
}
Reply 1 (1)

quannkbss
Shopify Partner
1 0 0

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