Skip to content

Instantly share code, notes, and snippets.

@tgmarinho
Created October 3, 2021 20:10
Show Gist options
  • Save tgmarinho/59938396422fb9c5d389eb96ec5e3e36 to your computer and use it in GitHub Desktop.
Save tgmarinho/59938396422fb9c5d389eb96ec5e3e36 to your computer and use it in GitHub Desktop.
Script to get schema.graphql from Hasura relay endpoint

Exporting the Hasura GraphQL schema

Install graphqurl

npm install -g graphqurl

If Hasura GraphQL engine is running with an admin secret

gq <https://yourappin.hasura.app/v1beta1/relay> -H "X-Hasura-Admin-Secret: adminsecretkey" --introspect > schema.graphql
cat schema.grapqhl

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment