/tfchain_graphql

Graphql for TFchain

Primary LanguageTypeScript

Tfchain graphql

Hydra is used to index and provide a graphql interface on toip of tfchain.

This is a project generated by hydra-cli scaffold. Types are defined in schema.graphql and the mappings in the mappings folder.

Concept

The substrate events are processed in a multi-step pipeline:

Tfchain => Hydra Indexer => Indexer GraphQL gateway => Hydra Processor => Database => Query Node GraphQL endpoint

Bird eye overview

Prerequisites

  • Node v14x
  • Docker

Bootstrap

yarn
yarn build
yarn db:up
yarn process

Configuration

Project's configuration is driven by environment variables, defined in .env, and manifest.yml. For more details see https://docs.subsquid.io.

Indexer

Running an indexer is required. The indexer can be found in the indexer folder.

It is recommeded to use already set up indexer if available, as new indexer typically requires some time to catch up with interesting events.

Have a look at ./indexer/docker-compose.yml for example of how you can set up a self-hosted version.