Sample Hydra Project
Prerequisites
Bootstrap
npm install
# make sure dependencies are deduped, this is important
npm dedupe
# generate TypeScript definitions for substrate types
npm run typegen
# Analyze schema.graphql and generate model/server files
npm run codegen
# Start postgres instance
docker-compose up -d
# Apply migrations related to processor's state keeping tables
npm run processor:migrate
# Analyze database state and create migration to match generated models
npm run db:create-migration
# Apply pending migrations
npm run db:migrate
# Now you can start processing chain data
npm run processor:start
# The above command will block
# Open separate terminal and launch graphql server to query the processed data
npm run query-node:startProject structure
Self-hosted indexer
Last updated