Coder Social home page Coder Social logo

graph-theory's Introduction

Graph-Theory

ts

Hosted Subgraph Link: https://thegraph.com/hosted-service/subgraph/labib147/usdt-transaction

Graph ql documentation for showing data in Graph Studio (Linux)

Go to Git of Graph protocol: https://github.com/graphprotocol

Find graph client folder and go through the installation process: https://github.com/graphprotocol/graph-cli

Install the followings beforehand

  1. Node
  2. NPM

Installation of node -

  1. sudo apt install nodejs
  2. sudo apt update
  3. curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
  4. sudo apt install -y nodejs
  5. node -v

Check this for help: https://www.freecodecamp.org/news/how-to-install-node-js-on-ubuntu-and-update-npm-to-the-latest-version/#:~:text=If%20you%20run%20into%20any,command%20above%20to%20update%20it.&text=sudo%20apt%20install%20build%2Dessential,NPM%20on%20your%20Ubuntu%20machine.
Or https://askubuntu.com/questions/1265813/how-to-update-node-js-to-the-long-term-support-version-on-ubuntu-20-04

After running the final command, you should get the following output v16.14.2

Installation of npm -

  1. sudo npm install -g npm@latest
  2. npm -v
  3. This should show an output as follows 8.5.0
  4. If this does not update to your required version, then try sudo npm install -g [email protected]

After this you can watch this 30 min video that explains the entire process step by step: https://www.youtube.com/watch?v=jxhNsSicEzA

The project might throw an error in the end because of the version of the dependencies. So, be sure to update the graph-cli & graph-ts to their latest versions.

    npm i @graphprotocol/graph-cli@latest or npm i -D @graphprotocol/graph-cli@latest 
    npm i @graphprotocol/graph-ts@latest or  npm i -D @graphprotocol/graph-ts@latest
    npm i @graphprotocol/graph-ts@latest

Afther updating the package.json file should show the following devDependencies:

    "@graphprotocol/graph-cli": "^0.29.0",
    "@graphprotocol/graph-ts": "^0.26.0",    
    "typescript": "^4.6.2"

Install graph-cli in your package.json file graph codegen ./token.yaml (Generates a schema.ts file)

npm install

Use npm run codegen or yarn run codegen to run codegen

  • yarn run deploy *paste your access token here*

graph-theory's People

Contributors

labib147 avatar

Watchers

 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.