-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(apollo-parser): add ignored tokens to TYPE nodes in correct place
This commit re-writes the parsing logic for TYPE nodes to have an easier time accounting for ignored tokens and their correct place in the AST. An intermediate representation of the TYPE and it's nullability and list status is created and then processed to put the correct tokens in their spots. Before this commit this sort of query ```graphql mutation MyMutation($custId: Int!, $b: String) { myMutation(custId: $custId) } ``` would result the `ast.document.to_string()` to have this output: ``` mutation MyMutation($custId: , Int!$b: String) { myMutation(custId: $custId) } ``` which is incorrect. The `to_string()` now results in the exact same output, as the AST created is correct.
- Loading branch information
Showing
24 changed files
with
1,013 additions
and
836 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.