GraphQL API Schema URL

Simranjeet
Shopify Partner
71 8 14

Hi,

Is it possible to get the schema endpoint for graphql admin api ? I want to use it in typescript code generator. I assume Shopify doesn't expose it without authentication, any other way how to get it inside codegen.yml file ?

Thank you

Simranjeet

0 Likes
fangwz
Tourist
6 0 1

You just encountered the BIGGEST part of using Shopify GraphQL API if no available SDK exists.

I search it for several days and tried some methods on StackOverflow, but still got nothing!

It's like that Shopify hide theGraphQL schema as their deepest secret!

 

fangwz
Tourist
6 0 1

Finally I find that the whole schema of Shopify GraphQL could be fetched via a GraphQL request if you are familiar with GraphQL. It's sort of a self-described thing in GraphQL.

Shopify supposes that every developer is familiar with GraphQL syntax when doing some integration with it, which is really sometimes not.

I created a java SDK for integration with Shopify Apis: https://github.com/YuanWenqing/shopify4j . It contains both GraphQL schemas of Admin GraphQL and Storefront GraphQL.

GraphQL queries to request the schema can also be found there. May it help for the favor of someone who needs it. 

0 Likes