The mQuark Subgraph API
To extend the ability of queriying the smart contracts in mQuark, we have created a subgraph that indexes all the neccessary events and creates a database for you to acces those data. This is a great way to get started with mQuark and start building your own applications on top of it. So, that you don't have to be worried about the smart contract events and their data structure.
If you would like to direcctly see our API, you can visit the following link:
T.B.A
You can use tools such as GraphQL Playground or Apollo's Studio to explore test queries. These endpoints are open to everyone and do not require any signature.
Getting Started
Information, read-only, queries are open to everyone. These queries do not require any signature. Examples of such queries include: inquiring about the assets of a given owner, retrieving the current properties of an NFT, etc. You can use any HTTP client to communicate with this API.
Subgraph Entrypoint:
The graph hosted service for the mQuark subgraph provides easy endpoints for data querying.
API Query Example
Let's break it down by an example, say we want to get the list of all Templates available in mQuark protocol. This is how it will look:
query {
templates {
id
templateId
uri
category
price
mintedCount
}
}
In the example above, we are sending a POST
request to the Request URL
, that is https://api.studio.thegraph.com/query/35629/mquark-testnet-v1/version/latest
, and ask for all the templates
object. but we also choose which properties we are looking to get from the api. As you can see inside the brackets, we are selecting the following keys:
uri
templateId
mintedCount
category
price
mintedCount
To get to know more about what the other keys are, you can visit the following link: mQuark Subgraph