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

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