Skip to content

subsquid/hasura-configuration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@subsquid/hasura-configuration

A tool that configures Hasura to track all database tables that have TypeORM models in SQD indexers.

The configuration is saved to a file compatible with the standard Hasura import / export procedure ("Settings > Metadata Actions" in the web GUI). You can edit it in the GUI, export it, then apply it after it is erased (e.g. when the Hasura container is recreated).

Usage

# 1. Install
npm i @subsquid/hasura-configuration

# 2. List available commands
npx squid-hasura-configuration --help
apply           Apply the configuration at hasura_metadata.json
regenerate      Analyze TypeORM models and generate a Hasura configuration
                at hasura_metadata.json that tracks all related tables and
                foreign key relationships

The apply command takes Hasura connection settings from environment variables:

  • HASURA_GRAPHQL_ENDPOINT (default: http://localhost:8080)
  • HASURA_GRAPHQL_ADMIN_SECRET

About

Hasura configuration tool for use in SQD indexers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published