Skip to content

Latest commit

 

History

History
74 lines (46 loc) · 1.43 KB

development.md

File metadata and controls

74 lines (46 loc) · 1.43 KB

Developing on tfchain graphql

Install:

yarn
yarn build

Local Network

Run tfchain

see https://github.com/threefoldtech/tfchain

Run Indexer

Check indexer/.env and adjust the websocket endpoint to your local tfchain address.

cd indexer
docker-compose up -d

Indexer services should now be started, you can check if it's syncing properly by streaming the logs for the indexer:

docker logs indexer-ingest-1 -f

You should be able to follow tfchain blocks processing:

image

Run processor

Check .env and adjust the websocket endpoint to your local tfchain address.

yarn build
yarn db:up
yarn process

You should be able to follow tfchain blocks processing:

image

If you make some changes, don't forget to turn down container before tuning it on again.

docker-compose down

Run graphql UI

At this step, by running

docker ps

it should display such list of running containers:

image

Make sure indexer and processor are both listening to tfchain to be able to browse.

yarn api

Now you can use the UI (http://localhost:4000/graphql) and run some tests.