- Create an API key in Subgraph Studio
- Search
<API_KEY>
in this repo and replace all<API_KEY>
's' with your new API Key - Send your demo queries!
https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/CBf1FtUKFnipwKVm36mHyeMtkuhjmh4KHzY3uWNNq5ow
The demo query retrieves the top 10 accounts where the total supply is greater than 500.
{
collections(first: 10, where: { totalSupply_gt: "500" }) {
id
name
symbol
totalSupply
}
}
cd vanilla-js-query
open javascriptQuery.html
cd flask-query
pip install Flask requests
python app.py
- Open the development server that appears in the terminal to see the query response: (http://127.0.0.1:5000)
See this excellent walkthrough video for an overview of graph-client
cd graph-client-query
npm install
npm run start
to send our test query and see responses in the terminal.- To send test queries through our browser, run
npm run dev
to set up GraphQL explorer. - To integrate graph-client into our dapp, run
npm run codegen
to build an a new SDK.
cd react-apollo-query
npm install
npm run start
to send test query and see responses at http://localhost:3000