Getting INTERNAL_SERVER_ERROR when trying to read marketing events data using GraphQL

Getting INTERNAL_SERVER_ERROR when trying to read marketing events data using GraphQL

akashgoel1995
Shopify Partner
3 0 2

Getting this error for GraphQL query trying to read marketing events data. 
Error:
{

     message: 'Internal error. Looks like something went wrong on our end.\n' +

         'Request ID: af768f39-d0a3-4c5e-b025-a2b5b6305a19 (include this in support requests).',

     extensions: {

           code: 'INTERNAL_SERVER_ERROR',

           requestId: 'af768f39-d0a3-4c5e-b025-a2b5b6305a19'

     }

}

Query:

{
marketingEvents (first: 10) {
edges{
node {
channel
description
endedAt
id
sourceAndMedium
startedAt
type
utmCampaign
utmMedium
utmSource
}
}
}
}

 

Same query works using Shopify GraphiQL App.
I have read_marketing_events permission also. 
Can someone from @Shopify help?

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 498

Hi @akashgoel1995 👋

 

Thank you for flagging this and sharing the request ID! The `read_marketing_events` grants apps to read marketing events that were created by the same app, and from the logs it appears that the returned event was created by a different app. We're investigating this further, and for the moment, we recommend using the `app_id` query filter with your own app ID to avoid this issue:

 

{
 marketingEvents(first: 10, query: "app_id:123") { 
   nodes {
     id
   }
 }
}

 

It would be very helpful to know the use case here as well!

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog