Hasura Cloud configuration providing a unified GraphQL API over our datastores for the Catalog application.
- Docker Desktop installed and running
- Hasura CLI installed
- Doppler CLI installed
- Environment variables configured (see the top-level README)
-
Set the NPM_TOKEN environment variable (retrieve from Doppler):
export NPM_TOKEN=*npm_token*
-
(Optional) Clear old data if needed:
yarn dcs-local
-
Start Hasura:
yarn dcu-local # Wait ~15s for full initialization (may prompt for Heroku auth) yarn hasura-init cd hasura/ hasura console # Opens Hasura Console in your browser
Always make data model changes locally first, then apply as migrations to production.
- Edit locally: Changes made in
hasura consoleautomatically generate migration files inhasura/migrations/ - Review: Create a PR with your changes
- Apply to production after merging:
hasura migrate apply --endpoint https://catalog-prod.hasura.app --admin-secret '*secret*' hasura metadata apply --endpoint https://catalog-prod.hasura.app --admin-secret '*secret*'
Note: The admin secret must be surrounded by single quotes. Find it in Doppler under catalog/prd as CATALOG_PROD_HASURA_ADMIN_SECRET.
Two options for stopping local containers:
yarn dcs-local— Stops containers and removes Docker images/volumes. Use this to ensure fresh container instances on next startup.yarn dcs— Stops containers only, preserving images/volumes/containers.
Note: Database backup data persists in hasura/Docker/docker-entrypoint-initdb.d/latest.dump, so yarn dcu-local typically only needs to run once per branch initialization.