You can install Graph CLI with either npm or yarn.
Note: You need version 0.21.0 or above
-
INSTALL GRAPH CLI USING NPM
npm install -g @graphprotocol/graph-cli
Initialize your subgraph.
-
INITIALIZE SUBGRAPH
graph init --studio safes
-
AUTH & DEPLOY
Authenticate within the CLI, build and deploy your subgraph to the Studio.
-
AUTHENTICATE IN CLI
graph auth --studio eb3738—7f5a7e
-
ENTER SUBGRAPH
cd safes
-
BUILD SUBGRAPH
graph codegen && graph build
-
DEPLOY SUBGRAPH
graph deploy --studio safes