Using Apollo CLI, you can get the schema as follows:
Run ``npm install -g apollo`` to install the Apollo CLI. You can then run the following command to download the GraphQL schema:
..code-block:: bash
# If the GraphQL engine is running at https://my-graphql-engine.com/v1alpha1/graphql,
# without an admin secret
apollo schema:download --endpoint https://my-graphql-engine.com/v1alpha1/graphql
# If Hasura GraphQL Engine is running with an admin secret
apollo schema:download --endpoint https://my-graphql-engine.com/v1alpha1/graphql --header 'X-Hasura-Admin-Secret: adminsecretkey'
Note that ``apollo schema:download`` is an alias of the command `apollo service:download <https://github.com/apollographql/apollo-tooling#apollo-servicedownload-output>`__.
By default, this downloads the schema to a file called ``schema.json``. This command has no other output types.