Migrate Everest to use graph-client library
#226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We recently introduced https://github.com/graphprotocol/graph-client as a wrapper for making it easier to dapps to write JS/TS (browser/Node) apps.
This is an initial PR for using this client in Everest app, with minimal changes.
Changes includes:
graph-clientand generated The Graph Client library (nothing too sophisticated at the moment, later we can leverage all the cool features there)..graphqlfiles and updated the code accordingly (this way the graph client validates the operations at build time, and we get complete TypeScript support out of the box)cross-fetchwithcross-undici-fetchfor better native support (both Gatsby's Node env and browser env)I recommend doing follow-up PRs later, to improve:
@graphprotocol/mutationsand use built-in mutations support fromgraph-client