Skip to content
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

Replace p.err with p.err_and_pop to prevent infinite loop. #158

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

MidasLamb
Copy link
Contributor

operation_definition is called in a loop where the we never progress
in which tokens we're looking at.
Pop while reporting the error such that progress can be made.

`operation_definition` is called in a loop where the we never progress
in which tokens we're looking at.
Pop while reporting the error such that progress can be made.
@lrlna lrlna merged commit 48be5b8 into apollographql:main Feb 7, 2022
@lrlna
Copy link
Member

lrlna commented Feb 7, 2022

Thank you, this is great!

lrlna added a commit that referenced this pull request Feb 7, 2022
Avoids creating an operation definition node when an unrelated token is popped off in the parsing of operation definition nodes.

Additionally, we are adding an correctly testing for number of errors and definitions in the AST when a description precedes an Operation Definition. We are also adding an error test case to the test suite with a description before an operation definition.
lrlna added a commit that referenced this pull request Feb 7, 2022
Avoids creating an operation definition node when an unrelated token is popped off in the parsing of operation definition nodes.

Additionally, we are adding an correctly testing for number of errors and definitions in the AST when a description precedes an Operation Definition. We are also adding an error test case to the test suite with a description before an operation definition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants