{"id":13652270,"url":"https://github.com/playzero/substrate-graph","last_synced_at":"2026-02-01T03:22:08.650Z","repository":{"id":40422378,"uuid":"268479380","full_name":"playzero/substrate-graph","owner":"playzero","description":"a compact graph indexer stack for parity substrate, polkadot, kusama","archived":false,"fork":false,"pushed_at":"2023-01-07T07:33:58.000Z","size":30136,"stargazers_count":32,"open_issues_count":10,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-13T19:12:18.368Z","etag":null,"topics":["docker","docker-compose","graphql","hasura","helm","kubernetes","polkadot","postgresql","rust","substrate"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/playzero.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-01T09:30:58.000Z","updated_at":"2024-03-17T07:33:41.000Z","dependencies_parsed_at":"2023-02-06T15:01:28.532Z","dependency_job_id":null,"html_url":"https://github.com/playzero/substrate-graph","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playzero%2Fsubstrate-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playzero%2Fsubstrate-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playzero%2Fsubstrate-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playzero%2Fsubstrate-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/playzero","download_url":"https://codeload.github.com/playzero/substrate-graph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365245,"owners_count":21418654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","graphql","hasura","helm","kubernetes","polkadot","postgresql","rust","substrate"],"created_at":"2024-08-02T02:00:57.794Z","updated_at":"2026-02-01T03:22:08.617Z","avatar_url":"https://github.com/playzero.png","language":"Elixir","funding_links":[],"categories":["Tools","Elixir"],"sub_categories":[],"readme":"# Substrate Graph\n\n## What\nA compact indexer for @paritytech substrate based nodes providing a graphql interface.\n\n![Realtime](/doc/realtime.gif)\n\n## Why\nInteracting, archiving and querying transactions on blockchain nodes can become expensive.\nAn indexer provides unified access to historic data. Parsing and creating complex interfaces with this data is cumbersome when using REST, GraphQL offers the latest and greatest to query, subscribe and mutate data leading to efficient data structures and therefore hopefully cleaner code and better (D)Apps.\n\n## How\nWe have built a docker-compose to fire up a stack as pictured below:\n\n![Schema](/doc/stack-basic.png)\n\n### Getting started\n\nThis is tested on macOS and Linux. Experience may vary on Windoze.\n\nRequirements:\n- docker\n- docker-compose\n- text editor\n- (make)\n\nIf you want to build/edit frontend or archiver:\n- rust\n\n### Run it\n\n0. clone the repo `git clone https://github.com/playzero/substrate-graph \u0026\u0026 cd substrate-graph`\n1. setup your env vars or start with a clone of `.env.example` ('')\n2. setup your archiver config and chainspec in `./config`\n3. `docker-compose up`\n4. log in to hasura `localhost:18080` and enter your admin password\n5. on the data tab, add all untracked items\n6. have phun in graphiql!\n\nAll data will be persisted in your local repository `./data`. Inside all services will store their data, like postgres, substrate/polkadot/kusama. To restart fresh, when things go south, make sure to clean up the contents of the data folder.\n\n## Frontend\n\nAn example app has been created in packages/substrate-graph-frontend.\nTo get started with it, from your substrate-graph dir, get the submodules with\n`git submodule init \u0026\u0026 git submodule update`.\n\nAfter that you may build the frontend app like this and run it afterwards:\n`cd ./packages/substrate-graph-frontend \u0026\u0026 yarn`, then `yarn start`.\n\nif everything runs smoothly, you will see a graphql subscription rendering into a block number and a small table showing recent blocks and contents.\n\n## Substrate-Archive\n\nCurrently an older archive version is used for building the docker images, which are used in the compose file. They are based on code found at packages/substrate-archive. This will be updated but ofc you may use your own images here, if you so wish.\n\n## Status\n\n- [X] add polkadot\n- [X] add custom substrate nodes (substrate node template)\n- [X] add config examples\n- [X] add docker-compose\n- [X] add subscriptions\n- [X] add frontend example\n- [ ] add monitoring dashboard\n- [ ] add load balancer example\n- [ ] kubernetes / helm chart\n- [ ] add crawler / harvester\n\n- [ ] add\n\n## Discuss\n\nJoin us on Discord: [ZERO on Discord](https://discord.gg/gtya5Dv)\n\n## Credits\n\n- [Substrate Archive](https://github.com/paritytech/substrate-archive)\n\n## Further Reading\n\n- [Substrate](https://github.com/paritytech/substrate)\n- [Substrate Developer Portal](https://substrate.dev/)\n- [Parity](https://www.parity.io/)\n- [Web3 Foundation](https://web3.foundation/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayzero%2Fsubstrate-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplayzero%2Fsubstrate-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplayzero%2Fsubstrate-graph/lists"}