Subgraph code to build an open API to index and query members information on FIleverse Portal
If your smart contract is on the Ethereum Mainnet network then use Subgraph Studio
, for any other network use Hosted Service
- Install graph-cli :
npm install -g @graphprotocol/graph-cli
ORyarn global add @graphprotocol/graph-cli
- Clone the repo and run
npm install
ORyarn
- Copy and paste the Authentication command from your Subgraph page :
For other networks (Goerli in our case) : graph auth --product hosted-service <deploy key>
For Mainnet : graph auth --studio <deploy key>
- Copy and paste the Deploy command from your Subgraph page :
For other networks (Goerli in our case) : graph deploy --product hosted-service <username/subgraphname>
For Mainnet : graph deploy --studio <subgraph name>
And your subgraph is deployed and ready to use !!