TheGraph is an Ethereum indexer that stores aggregated data on IPFS directly from the Ethereum blockchain. When you change the state of the blockchain (mint, transfer, buy, or burn) an event is emitted and then organized by our open sourced mapping tool. Our entire interface hooks into the open query using polling on our React app with Apollo GraphQL, and updates on blockchain confirmations. You can also build your own reporting systems from this.
// Websocketwss://api.thegraph.com/subgraphs/name/nategeier/mintbase// Queryhttps://api.thegraph.com/subgraphs/name/nategeier/mintbase
Click the drop down here and you can see example, but just enter your created contract (make sure it's all lowercase)
A Thing is the batch of tokens (like a cup of coffee) and a Thing will have many to it tokens (15 tokens of a Thing).
You'll notice in our graph under s=tokens there is a state field, this is what helps us sell or not sell an item using the
buyThing function. If a user sets a price and is for sale anyone can grab that NFT if they throw the price or greater. If no price is set and the token is set for sale, anyone can grab them for free, they just need to pay the transfer gas cost.
What the state does
Not for Sale
The token can only be airdropped by the minter
Anyone can grab the token using the
Sold and cannot go up for resale on Mintbase,
Sent after minting
We use Apollo on our React app front end for https://mintbase.io that hooks into the graph query url