GraphQL Empty response

New Member
1 0 0

Hi team,

 

I am working on one shopify app for my client. I need to install some custom JS code to the website so I was thinking about leveraging ScriptTag. 

 

However what I've encounter is, I can query all script tag through GraphiQL, but when I'm using the same query, I only get empty response within the app.

 

I feel this is a permission issue, I've made sure that I've included "read_script_tags" in access scope. Also at the same time I see there is a doc talking about OAuth, which I thought may lead me to the right place. However I've got no clue on how to either generate or use this access_token in my app. 

 

Could you please help me on debugging?

0 Likes
Highlighted
Excursionist
25 0 4

Hi,

I do have a question regarding Graphql, i made it work but when we changed our domain from ".myshopify" to "custom" domain, it stopped working, it returns a error 400.

Here's the complete error.

 

OPTIONS https://testwebsite.myshopify.com/admin/api/graphql.json 400

 

Access to XMLHttpRequest at 'https://testwebsite.myshopify.com/admin/api/graphql.json' from origin 'https://testwebsite.com.au' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hope you can give me an answer.

Thank you

0 Likes