Simple Queries
All queries on our graph can be used, using a simple fetch api.
https://thegraph.com/explorer/subgraph/nategeier/mintbase?query=All%20Stores
Hosted Service
1
const uri = 'https://api.thegraph.com/subgraphs/name/nategeier/mintbase'
2
3
const query = `
4
query {
5
stores(first:1000) {
6
id
7
}
8
}
9
`;
10
11
const opts = {
12
method: "POST",
13
headers: { "Content-Type": "application/json" },
14
body: JSON.stringify({ query })
15
};
16
fetch(uri, opts)
17
.then(res => res.json())
18
.then(console.log)
19
.catch(console.error);
20
21
22
23
Copied!
Last modified 1yr ago
Copy link