Hasura CLI

Install Hasura CLI

Depending on the platform, install Hasura CLI by following the steps in docs.

We will make use of Hasura CLI to manage the project locally. Start with an empty folder and execute the following command:

hasura init

This will create a new project structure locally under the given directory (hasura by default). This is how the directory structure looks:

├── config.yaml
├── metadata
│   ├── actions.graphql
│   ├── actions.yaml
│   ├── allow_list.yaml
│   ├── cron_triggers.yaml
│   ├── databases
│   │   └── databases.yaml
│   ├── query_collections.yaml
│   ├── remote_schemas.yaml
│   └── version.yaml
├── migrations
└── seeds

The migrations and seeds directories are initally empty. The metadata directory contains a bunch of yaml files each describing different parts of the GraphQL API, like the actions, remote schemas and the different databases that are connected to this project along with their tables and functions etc.

Since you have Hasura running locally via docker-compose, run the following command

hasura console

This should open up the console on http://localhost:9695 and is the same GUI as the one you see on the server console at http://localhost:8080


Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. ✌️