Leszek Wiesner a7d7dad7ad Query node: Initial Storage v2 mappings 3 years ago
..
mappings a7d7dad7ad Query node: Initial Storage v2 mappings 3 years ago
schemas 159190ba60 Initial schema 3 years ago
.gitignore 76916dfdd6 query-node: do not check in generated code 4 years ago
README.md fe235ebd3f query-node: configure with two separate databases 4 years ago
build.sh bf4306ed45 Query node: Further setup adjustments 3 years ago
kill.sh bf4306ed45 Query node: Further setup adjustments 3 years ago
manifest.yml a7d7dad7ad Query node: Initial Storage v2 mappings 3 years ago
package.json bf4306ed45 Query node: Further setup adjustments 3 years ago
run-tests.sh bd06e736f7 query-node: remove db seeding from run-tests.sh 4 years ago
start.sh bf4306ed45 Query node: Further setup adjustments 3 years ago
tsconfig.json 94e8fb7ae8 Query node - fix @joystream/types issue 4 years ago

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