Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Add comments to GraphQL schema #1

Open
HariSeldon23 opened this issue Mar 3, 2021 · 1 comment
Open

Add comments to GraphQL schema #1

HariSeldon23 opened this issue Mar 3, 2021 · 1 comment

Comments

@HariSeldon23
Copy link
Contributor

HariSeldon23 commented Mar 3, 2021

I'm busy looking at building a bot that utilises the Pangolin subgraph to work out historical profitability. As part of that I've been playing with the GraphQL API at https://graph-node.avax.network/subgraphs/name/dasconnor/pangolindex

If I look at an example query I've been running:
image

Just in that example I can see numerous improvements we can make to add comments to the schema. Some of these are:

  • Is the reserve figure in the native Token or USD?
  • reserveETH should be renamed to reserveAVAX
  • reserveETH and reserveUSD are matching. Is this is USD?
  • token1Price and token2Price doesn't explain if this is compared to each other? It also doesn't explain direction of the comparison. Is it WAVAX-ETH or else ETH-WAVAX
  • What is the token/currency of totalSupply? USD?
  • What is the volumeToken0 and volumeToken1 token/currency? Is it the native token or USD?

A lot of these queries can be very simple answered by just including comments in the schema

@veridelisi
Copy link

Dear Justin
How could I take any pool's swap/mint/burn/price values in historically with graphQL?
Could you add any sample code?

Sincerely
Engin YILMAZ

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants