Subgraph Examples

We recommend using Insomnia or The Graph's website for testing queries.

When using Insomnia, you can POST a GraphQL request to https://api.thegraph.com/subgraphs/name/f8n/fnd.

Auctions that have not received a bid#

query getAuctionsWithoutABid {
nftMarketAuctions(
where: {status: Open, highestBid: null}
) {
nft {
tokenId
tokenIPFSPath
}
reservePriceInETH
}
}

Auctions that are currently counting down#

query getAuctionsInProgress($nowInSeconds: BigInt!) {
nftMarketAuctions(
where: {status: Open, dateEnding_gt: $nowInSeconds}
) {
nft {
tokenId
tokenIPFSPath
}
reservePriceInETH
}
}

NFTs and their auctions by a specific creator#

query getNftsByCreator($creator: String!) {
creator(id: $creator) {
nfts {
tokenId
mostRecentAuction {
status
dateEnding
reservePriceInETH
highestBid {
amountInETH
}
}
}
}
}