Shopify GraphQL - no schema file exists even though it does

Shopify Partner
128 0 23

I'm trying to get started with Graphql and Shopify. I am getting the following error:


Client for API version 2020-01 does not exist because no schema file exists at `shopify_graphql_schemas/2020-01.json`. (ShopifyAPI::GraphQL::InvalidClient)


Even though I've run this rake task:


rake shopify_api:graphql:dump SHOP_DOMAIN="" ACCESS_TOKEN="the_right_token" API_VERSION=2020-01



And I can see the file here: and when I run



I get `#<Pathname:/home/shipping-new/db/shopify_graphql_schemas>`


I am only trying to do the following to get the shop name as a test:


sesh = "", token: 'xx', api_version: '2020-01')

client = ShopifyAPI::GraphQL.client

SHOP_NAME_QUERY = client.parse <<-'GRAPHQL'
  shop {

result = client.query(SHOP_NAME_QUERY)



My Shopify Initializer config file also has the same `api_version` here:

config.api_version = "2021-01"


How can I download the schema in order to use GraphQL for Shopify?

ByteStand - Amazon to Shopify in one click
Replies 3 (3)
6 0 2

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.

Here's a SDK on Github: , which contains both GraphQL schemas of Admin GraphQL and Storefront GraphQL.

GraphQL queries to request the schema can also be found there. You may find the similar query by hacking the request when loading a Shopify GraphQL Explorer.

May it help!

Shopify Partner
4 0 3

If you know python. You can grab the GraphQL Schema with sgqlc.


python3 -m sgqlc.introspection \
     --exclude-deprecated \
     --exclude-description \
     -H "X-Shopify-Access-Token: ACCESS_TOKEN" \ \


If you link you can convert the shopify_schema.json to a Python schema class


sgqlc-codegen schema shopify_schema.json


New Member
1 0 0


Is there any tool for converting admin-schema@2021-01.json to the graphql SDL format?

I used some tools like json-schema-to-graphql-types, but it didn't work.

Thanks in advance