Add GraphQL schema#199
Merged
Merged
Conversation
lightclient
reviewed
Mar 15, 2022
Member
There was a problem hiding this comment.
This is really neat - thanks for this. Do you mind also doing the following:
- Add the script you provided into the
scriptsdirectory here + adapt it to actually write the schema to thegraphql.jsonfile? - Add a CI check to validate the schema (maybe something like this)?
Contributor
Author
|
Done. Re 2. I use the semantic validation offered by the graphql library itself, but it doesn't check other lint-ish rules like the one you linked. Happy to add that too if you think it helps |
lightclient
approved these changes
Mar 21, 2022
Member
lightclient
left a comment
There was a problem hiding this comment.
Thank you! The validator you wrote seems fine. The main thing I want to avoid is having a graphql.json file that can't be consumed for some reason, so it seems like buildClientSchema will catch that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The schema can be explored via https://s1na.github.io/graphql-schema-explorer/?url=https://raw.githubusercontent.com/s1na/execution-apis/7b57bc60a59dc5ac8d8bffc0e5df4a12134cf2ae/graphql.json
This was exported from geth which has some EIP-1559 related fields in addition to the eip.
Fixes #163
This is the script I used to generate this against a live node: