A DAOstack subgraph for graph-node
Develop locally:
npm i
- install dependencies.npm run codegen
- generate automatic typings.- create a
.env
file with the following environment variables (should be kept secret):
POSTGRES_PASSWORD
- a secret string used as the PostgreSQL password for the created DB.ETHEREUM
- url to an rpc ethereum node prefixed with the network name (e.g.mainnet:http://localhost:8545
)
- (in a seperate terminal)
docker-compose up
(install) - run a local graph-node with the above config. npm run deploy
/npm run deploy:watch
- deploy the subgraph.
Note: All persistent data for the node will be stored in the ./data
directory, remove this directory in order to reset the node.
Exposed endpoints:
http://localhost:8000/daostack
- GraphQL API.http://localhost:8020
- graph-node RPC server.postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
- postgres DB connection.http://localhost:5001
- ipfs node api.