While setting up VS Code for GraphQL development (with autocomplete and schema validation) I wanted to download a copy of Shopify’s GraphQL schema for local use. After a little searching I found get-graphql-schema which allows you to download the entire GraphQL schema to a file.
As for where to download the schema from, initially it seemed like you needed to use an authenticated endpoint but I found that Shopify also makes an unauthenticated endpoint available at https://shopify.dev/admin-graphql-direct-proxy/
.
Putting this together, you can download the entire GraphQL schema with something like this:
npx get-graphql-schema https://shopify.dev/admin-graphql-direct-proxy/2025-04 \
> shopify-2025-04.schema
You can also send custom HTTP headers with get-graphql-schema
so if you do want to access the schema from a specific store you can do so with an app’s access token:
npx get-graphql-schema https://example.myshopify.com/admin/api/2025-04/graphql.json \
--header "X-Shopify-Access-Token=shpat_XXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
> shopify-2025-04.schema
Once you have the schema locally, if you’re using VS Code, you can use the official GraphQL extension and set the schema to the local file. This will enable features like validation and autocomplete.