If you find yourself getting a "401 Unauthorized" error when trying to do a schema dump for the GraphQL API, and you've got a custom app, the following instructions are confusing:
Dumps a local JSON schema file of the Shopify Admin API. The schema is specific to an
API version and authentication is required (either OAuth or private app).
Dump the schema file for the 2020-01 API version using private app authentication:
$ rake shopify_api:graphql:dump SHOP_URL="https://API_KEY:PASSWORD@SHOP_NAME.myshopify.com" API_VERSION=2020-01
Dump the schema file for the unstable API version using an OAuth access token:
$ rake shopify_api:graphql:dump SHOP_DOMAIN=SHOP_NAME.myshopify.com ACCESS_TOKEN=abc API_VERSION=unstable
What about a custom app? Not a private app, not a public app...