Basic queries
In this section, you'll make some simple and basic queries:
You can try this directly in our alphanet indexer's playground or in our mainnet indexer's playground
Query owned NFTs on the nftEntities
query { nftEntities( first: 5, filter: { owner: { equalTo: "5CDGXH8Q9DzD3TnATTG6qm6f4yR1kbECBGUmh2XbEBQ8Jfa5" } } ) { totalCount nodes { nftId owner creator collectionId offchainData } }}
To access the nodes information you want to display, you can look directly into the docs panel on the right side of the playground :
Query created NFTs on the nftEntities
query { nftEntities( first: 5, filter: { creator: { equalTo: "5CDGXH8Q9DzD3TnATTG6qm6f4yR1kbECBGUmh2XbEBQ8Jfa5" } } ) { totalCount nodes { nftId owner creator collectionId offchainData } }}
Let's query the 10 first listed NFTs on the nftEntities
query { nftEntities(first: 10, filter: { listedForSale: { equalTo: true } }) { totalCount nodes { nftId listedForSale owner timestampList price marketplaceId } }}
Query marketplaces on the marketplaceEntities
query { marketplaceEntities{ totalCount nodes { marketplaceId offchainData kind owner commissionFeeType commissionFee commissionFeeRounded listingFeeType listingFee listingFeeRounded } }}
Query a specific NFT on the nftEntity
query { nftEntity(id: "100") { nftId owner creator collectionId offchainData }}
Query specific NFT history on the nftOperationEntities
query { nftOperationEntities( orderBy: TIMESTAMP_DESC filter: { nftId: { equalTo: "100" } } ) { totalCount nodes { nftId blockId extrinsicId typeOfTransaction from to price priceRounded timestamp } }}