dabit3 / near-nft-subgraph

NEAR Subgraph for indexing and querying NFT metadata

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NEAR Protocol subgraph

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:

  1. Visit The Graph hosted service dashboard, create a profile, and create a new subgraph by clicking Add Subgraph.

  2. Install The Graph CLI:

npm install -g @graphprotocol/graph-cli
  1. Authenticate the your CLI environment with the Access Token from your account dashboard:
graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>
  1. Replace username/apiname in package.json with your username and apiname, for example: dabit3/nearsubgraph

  2. Deploy the subgraph

yarn deploy
  1. Run a query
{
  tokens {
    id
    ownerId
    tokenId
    image
    metadata
    image
    kind
    seed
  }
}

About

NEAR Subgraph for indexing and querying NFT metadata


Languages

Language:TypeScript 100.0%