metmirr 83273eaad6 query-node: remove typedefs.json and revert copying types file há 4 anos atrás
..
bootstrap 7886c8d5bd Upgrade apps to @polkadot/api 4.2.1 (unfinished) há 4 anos atrás
mappings 83273eaad6 query-node: remove typedefs.json and revert copying types file há 4 anos atrás
scripts e91aac1b8b query-node: update mappings for new processor há 4 anos atrás
.gitignore 76916dfdd6 query-node: do not check in generated code há 4 anos atrás
README.md fe235ebd3f query-node: configure with two separate databases há 4 anos atrás
build.sh 83273eaad6 query-node: remove typedefs.json and revert copying types file há 4 anos atrás
db-migrate.sh 64f2a44010 query-node: env cleanup há 4 anos atrás
manifest.yml 402bfe9c95 query-node: types generated by hydra-typegen há 4 anos atrás
package.json 402bfe9c95 query-node: types generated by hydra-typegen há 4 anos atrás
processor-start.sh 63b9d1484e query-node: update bash scripts há 4 anos atrás
run-tests.sh bd06e736f7 query-node: remove db seeding from run-tests.sh há 4 anos atrás
schema.graphql 874999c584 query-node: add default schema to all newly created entities há 4 anos atrás
tsconfig.json 94e8fb7ae8 Query node - fix @joystream/types issue há 4 anos atrás

README.md

query-node

The query-node project contains an input schema (schema.graphql) and mappings for the Joystream content-directory runtime module.

Code generation

We use Hydra-cli to generate a graphql server and a block indexer for joystream chain:

$ cd query-node
$ yarn build

Starting services

To start services defined in the project docker-compose.yml, you should run docker-compose from the project root folder to use the correct .env file

Run mapping processor

Before running mappings make sure indexer(yarn indexer:start) and indexer-api-server (mappings get the chain data from this graphql server) are both running:

yarn processor:start

Query data

Once processor start to store event data you will be able to query this data from http://localhost:4002/graphql.

query {
  channels {
    handle
  }
}