GraphQL - Marketing activities empty response

GraphQL - Marketing activities empty response

Product_ADVRTY
Shopify Partner
11 0 3

Hi, I have created a marketing campaign for our store and added a marketing activity to it, but when I query the GraphQL API, the response comes back empty. 

 

This is my query below: (I am able to retrieve other data using GraphQL, so would discard any broader issue with the request initially)


{
  marketingActivities(first:10){
    edges{
      node{
        createdAt
        status
        app {
          id
        }
        marketingEvent {
          id
        }
        utmParameters{
          campaign
          content
          medium
          source
          term
       }
     }
   }
  }
}

Reply 1 (1)

awwdam
Shopify Staff
249 42 36

Hey @Product_ADVRTY 

I was able to take closer look at the query you shared and the documentation for the MarketingActivity object-  based on this the first requirement would be requesting access to the read_marketing_events,write_marketing_events scopes.

From there, the docs only have a marketingActivity query (singular) that requires a MarketingActivity.id as an argument. I used marketingActivityCreate to generate a new object, and then returned data when using the id as expected.  

Hope that offers some insight and clarification on expected results - Cheers!






awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me 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