KOISAN INTERNATIONAL COIN (KIC)
  • 📜KOISAN INTERNATIONAL COIN (KIC) WHITEPAPER
  • ⛓️KOISAN CHAIN
    • About Koisan Chain
    • Wallet
    • Consensus
    • Meta Transaction
    • Genesis File
    • Node
      • Compile and Run
      • Deployment
      • On-Chain Interaction
      • Contract
      • Private Chain Construction
      • Graph Node
      • Mainnet
      • DApp-Governance
      • Txpool
    • DApp Development
      • Account Management
      • KIC20
      • NFT
      • Remix
      • Truffle
  • 👥KOISAN TEAM
  • 📡KIC ECOSYSTEM
    • 🦈KOISAN WORLD NFT GAME
    • 🎮Gameplay
  • 🌐KOISAN SOCIAL MEDIA
Powered by GitBook
On this page
  • Project Info
  • Usage
  • Set up graph-node
  • Create Subgraph
  • Deploy Subgraph
  • GraphQL Usage
  1. KOISAN CHAIN
  2. Node

Graph Node

PreviousPrivate Chain ConstructionNextMainnet

Last updated 3 years ago

Project Info

Graph Node is a protocol for building decentralized applications (dApps) quickly on Ethereum and IPFS using GraphQL.

Usage

We recommend following the for deployment. The next operation is only intended as a simple setup tutorial for reference.

Set up graph-node

For convenience reasons, we use the official for node, database, and IPFS deployment.

Note that the value of the ethereum field in docker-compose.yml is replaced with Koisan's node connection information.

graph-node:
    image: graphprotocol/graph-node
    ports:
      - '8000:8000'
      - '8001:8001'
      - '8020:8020'
      - '8030:8030'
      - '8040:8040'
    depends_on:
      - ipfs
      - postgres
    environment:
      postgres_host: postgres
      postgres_user: graph-node
      postgres_pass: let-me-in
      postgres_db: graph-node
      ipfs: 'ipfs:5001'
      ethereum: 'mainnet:http://127.0.0.1:8545'  #replaced with koisan rpc info
      RUST_LOG: info

Note: The node connected to graph-node needs to be in archive mode (add flag --syncmode full --gcmode archive when starting the node), we recommend each user to build their own RPC node.

Create Subgraph

This needs to be written by each user according to their own situation. The following projects can be used as references:

Deploy Subgraph

Package and build the written subgraph into a wasm file and deploy to the graph node. The specific commands can be found in the sample project code above.

GraphQL Usage

Once deployed, you can use GraphQL to request data

⛓️
Official website
Github
Official documentation
docker compose
example-subgraph
graph-network-subgraph
uniswap-subgraph V1
uniswap-subgraph V2