Make ShopifyQL Request with React

Highlighted
Tourist
4 0 1

Hello, 

I am making a Shopify Embedded app and have followed the Node and React tutorial. This tutorial however only mentioned how to make GraphQL requests. For certain queries I need, such as sales reports, it seems that you have to use the ShopifyQL. I am just wondering how you make one of these queries in my current set up using React as I have found the queries but do not know how to call them and cannot find any React documentation about this.

 

Kind Regards,

Caolan

0 Likes
Highlighted
New Member
6 0 0

I'm having the same issue. I would really appreciate it if someone could give some feedback

0 Likes
Highlighted
Shopify Partner
531 38 109

While I personally haven't utilized this, I did see this documentation with examples --> https://shopify.dev/tutorials/get-store-metrics-with-analytics-api. Changing your ShopifyQL queries to pertain to reporting queries would assumedly get you what you need, correct?

0 Likes
Highlighted
New Member
6 0 0

Hey Greg,

I've tried using that resource while building a public app using node and react (https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/fetch-data-with-apollo).

However, I've been testing it on a development store, which I don't think has access to the advanced Shopify plan.

Should the node react app have the proper authentication to make these queries?  

Thanks.

0 Likes
Highlighted
Shopify Partner
531 38 109

The Analytics API does indeed require a shop to be on the Shopify Advanced Plan. The authentication comes in the initialization routine in your page. But if the shop isn't on the Advanced Plan then I don't think it's going to work anyway, right? 

0 Likes