https://github.com/threefoldtech/tfchain_graphql
Graphql for TFchain
https://github.com/threefoldtech/tfchain_graphql
Last synced: about 1 month ago
JSON representation
Graphql for TFchain
- Host: GitHub
- URL: https://github.com/threefoldtech/tfchain_graphql
- Owner: threefoldtech
- License: apache-2.0
- Created: 2022-01-04T16:07:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-22T10:43:16.000Z (about 1 year ago)
- Last Synced: 2024-04-22T11:42:25.940Z (about 1 year ago)
- Language: TypeScript
- Size: 2.91 MB
- Stars: 2
- Watchers: 12
- Forks: 3
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Tfchain graphql
[Subsquid](https://docs.subsquid.io) is used to index and provide a graphql interface on top of tfchain.
## Concept
The substrate events are processed in a multi-step pipeline:
Tfchain => Squid Indexer => Indexer GraphQL gateway => Squid Processor => Database => Query Node GraphQL endpoint

## Prerequisites
* Node v16x
* Docker
* Docker-compose## Running
see [docs](./docs/readme.md)
## Project layout
- `indexer` - docker-compose setup for the indexer
- `db` - Processor db migration files
- `scripts` - Scripts for generating initial state and development scripts
- `src` - Source
- `mappings` - Mapper functions for the indexer data
- `model` - Generated models from the `schema.graphql` file
- `types` - Type files that require manual edit if the schema changes / or chain types change
- `processor.ts` - Processor entrypoint
- `typegen` - Where the declaration files are generated from (used for development)
- `tfchainVersions.jsonl` - Generated tfchain runtime versions and their data
- `typegen.json` - Typegen config
- `typesBundle.json` - Typegen bundle config
- `schema.graphql` - The graphql schema file, changes to this file will results in changes to the models (`src/models`)