Development discussions around Shopify APIs
I'm trying to get the reason for app uninstall. The field in the docs: https://shopify.dev/docs/api/partner/2023-01/objects/RelationshipUninstalled#field-relationshipunins...
But the GraphQL query doesn't work:
{ app(id: "gid://partners/App/3426665") { events(types: [RELATIONSHIP_UNINSTALLED]) { edges { node { reason } } } } }
That returns
{ "errors": [ { "message": "Field 'reason' doesn't exist on type 'AppEvent'", "locations": [ { "line": 37, "column": 11 } ], "path": [ "query", "app", "events", "edges", "node", "reason" ], "extensions": { "code": "undefinedField", "typeName": "AppEvent", "fieldName": "reason" } } ] }
How do I get the uninstall reason?
I have a suspicion that Shopify documented this, but got tripped up by GraphQL ignorance and it's impossible to actually access it.
Solved! Go to the solution
This is an accepted solution.
Hi there! This is Paul from the Weaverse team. 😊
You can modify the GraphQL query to include reason
, description
, and shop details by using the following query:
{
app(id: "gid://partners/App/3426665") {
events(types: [RELATIONSHIP_UNINSTALLED]) {
edges {
node {
... on RelationshipUninstalled {
reason
description
shop {
id
myshopifyDomain
name
}
}
}
}
}
}
}
This query will return the uninstall reason, description, and shop details (including the shop ID, myshopifyDomain, and name) for each uninstalls event.
Let me know if this helps or if you need any further assistance. Cheers!
This is an accepted solution.
Hi there! This is Paul from the Weaverse team. 😊
You can modify the GraphQL query to include reason
, description
, and shop details by using the following query:
{
app(id: "gid://partners/App/3426665") {
events(types: [RELATIONSHIP_UNINSTALLED]) {
edges {
node {
... on RelationshipUninstalled {
reason
description
shop {
id
myshopifyDomain
name
}
}
}
}
}
}
}
This query will return the uninstall reason, description, and shop details (including the shop ID, myshopifyDomain, and name) for each uninstalls event.
Let me know if this helps or if you need any further assistance. Cheers!
User | RANK |
---|---|
10 | |
5 | |
3 | |
3 | |
3 |
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...
By Trevor May 15, 2023With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...
By Imogen Apr 26, 2023