Git Product home page Git Product logo

local-subgraph's Introduction

Running subgraph in local

How to run

Create a .env base on .env.example.

Make sure that all of the following port are available:

  • 8000, 8001, 8020, 8030, 8040: port for subgraph
  • 5001: ipfs

Run docker-compose build and docker-compose up.

After the whole system is up, you can use:

  • http://localhost:8000 to access the subgraph.

After running

  • git submodule init

  • git submodule update

  • Go to example-subgraph folder and run:

yarn
yarn codegen
yarn create-local
yarn deploy-local
  • Then you should see the subgraph docker will start to sync the example subgraph.

  • Go to http://127.0.0.1:8000/subgraphs/name/example to make some query!

Setting

In docker-compose.yml, ETHEREUM_POLLING_INTERVAL is set to 10 seconds to reduce number of requests to the RPC node.

Might need to changes it to a smaller value later (default is 0.5 secs)

Note

Subgraph will use a lot of request to the RPC, so make sure that you have enough quota on your account.

local-subgraph's People

Contributors

leduythuccs avatar

Stargazers

 avatar Edward Hoang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.