Integrate Apollo vscode extension with Shopify graphql.

Highlighted
Tourist
3 0 2

Hey,

I'm trying to use the Apollo vscode extension with Shopify graphql API. 

I need to supply the extension an entry point to get the introspection of the Graphql schema.

The only entry point I can found is https://shopify-graphiql-app.shopifycloud.com/admin/api/2019-04/graphql. But I can't make it work. I'm getting 403 error.

 

What headers should I send to this entry point? or is there a better way to get the schema?

 

Thank you.

 

0 Likes
Shopify Staff
Shopify Staff
1558 78 232

You need to authenticate the introspection request in the same way you authenticate the rest of your GraphQL requests. Assuming you have an access token, the header to provide is X-Shopify-Access-Token. The path you're sending this to is just /admin/api/2019-04/graphql.json.

 

I hope that helps!

0 Likes
Tourist
3 0 2

Thanks for the answer. Yes it helps.

Can I ask a feature request to add public entry point only for the introspection request. 

I want to added it to our build process and share it with our developers. Without the need to share access token. :)

2 Likes
Shopify Staff
Shopify Staff
1558 78 232

I don't see any glaring reasons for why we wouldn't consider allowing for unauthenticated introspection queries. I'll make sure that feedback is passed along.

 

Cheers.

1 Like