This project is an example of how you can build and deploy Graph Protocol APIs for NEAR.
This subgraph indexes data from Misfits smart contract transactions and makes them queryable.
To deploy this API, follow these steps:
-
Visit The Graph hosted service dashboard, create a profile, and create a new subgraph by clicking Add Subgraph.
-
Install The Graph CLI:
npm install -g @graphprotocol/graph-cli
- Authenticate the your CLI environment with the Access Token from your account dashboard:
graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>
-
Replace
username/apiname
inpackage.json
with your username and apiname, for example:dabit3/nearsubgraph
-
Deploy the subgraph
yarn deploy
- Run a query
{
tokens {
id
ownerId
tokenId
image
metadata
image
kind
seed
}
}