Mokhtar Naamani 7b4f85cc67 Merge pull request #1847 from metmirr/qnode-license-attribution há 4 anos atrás
..
bootstrap 835b9dc8fd remove hydra related code há 4 anos atrás
mappings 7b4f85cc67 Merge pull request #1847 from metmirr/qnode-license-attribution há 4 anos atrás
scripts 99aca3000b add script to get content-dir classes(id,name) from the chain há 4 anos atrás
.env 6aabc5c3db Fix typedefs path to avoid duplicate file há 4 anos atrás
.gitignore 76916dfdd6 query-node: do not check in generated code há 4 anos atrás
README.md ea241cf9f7 query-node: fix build scripts and remove generated code from yarn workspace há 4 anos atrás
build.sh f662b6fdda query-node: clean build há 4 anos atrás
indexer-tsconfig.json bdb01a7d87 add esModuleInterop flag to indexer-tsconfig.json há 4 anos atrás
package.json da9ec534bd hydra update indexer lib to v0.0.21 - handles finalized blocks há 4 anos atrás
run-tests.sh 547b64d070 start scripts forgot to bring up graphql-server há 4 anos atrás
schema.graphql dd32f719ba Merge remote-tracking branch 'upstream/babylon' into qnode-license-attribution 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

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 {
    title
  }
}