Skip to content

MjolNear/mjolnear-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MjolNear NFT marketplace Subgraph

This Subgraph sources events from contracts of MjolNear marketplace on NEAR chain.

GraphQL API

https://api.thegraph.com/subgraphs/name/mjolnear/indexer

Example Query

Here we have an example query for getting NFT details.

{
    marketTokens(
        first: 1
        orderBy: listingTimestamp
        where: {
            collection: "asac.near"
        }
    )
    {
        title
        owner {
            id
        }
        collection {
            title
        }
        contract {
            id
            isVerified
        }
    }
    activities(first: 1) {
        eventType
        txHash
        timestamp
    }
}

Example Response

Here we have response for the query above.

{
  "data": {
    "marketTokens": [
      {
        "title": "2710",
        "owner": {
          "id": "danielto.near"
        },
        "collection": {
          "title": "Antisocial Ape Club"
        },
        "contract": {
          "id": "asac.near",
          "isVerified": true
        }
      }
    ],
    "activities": [
      {
        "eventType": "List",
        "txHash": "1LjX7NSWz3XCDP6z2vBFsHjMdtTyf9uVtcsWqXmNYsz",
        "timestamp": "1649706537056"
      }
    ]
  }
}