-
Notifications
You must be signed in to change notification settings - Fork 32
improving the AST doc #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems some type/data definitions in AST and API (e.g. here and here ), are very close.
Furthermore, I didn't find any occurence of the various TypeDefinition from the AST module. Besides, I don't see why anything defined in the user's schema would end up in the AST, because making the schema does not require any real "parsing" (in the sense of Text -> AST.Something) |
Yes! The AST represents the syntax.
The parser can work just fine without an explicit
In a sense, it's just old code. The AST, parser, and printer were all imported from a different GraphQL project (for which we're very grateful). You can see this reflected in the license and copyright. I'd like graphql-api be able to work with parsed schema as well as our Servant-style type-level schema—certainly much of the code is re-usable—but I don't think that's the case now. |
I think a good way to improve the doc would be to provide examples at each level of the AST types with graphql doc snippets such as what I naively did in #145.
Something like:
I'm going to try to put together a PR for this.
I think it would be easier for new comers to grasp what is going on in the query parsing (which is half of the job), and helps a lot when it comes to contributing
The text was updated successfully, but these errors were encountered: