We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Our error spans are inconsistent when an error is created with err_and_pop.
err_and_pop
A few examples. GraphQL:
cats # comment
Document:
- [email protected] - [email protected] "\n" - [email protected] "# comment" - ERROR@0:4 "expected definition" cats
GraphQL:
cats type Query { name: String }
- [email protected] - [email protected] "\n\n" - [email protected] - [email protected] "type" - [email protected] " " - [email protected] - [email protected] "Query" - [email protected] " " - [email protected] - [email protected] "{" - [email protected] "\n " - [email protected] - [email protected] - [email protected] "name" - [email protected] ":" - [email protected] " " - [email protected] - [email protected] - [email protected] "String" - [email protected] "\n" - [email protected] "}" - ERROR@0:4 "expected definition" cats
This no longer becomes the case when the error precedes a valid statement, so if we reverse the two statements above:
type Query { name: String } cats
Our Document's spans are then correct:
- [email protected] - [email protected] - [email protected] "type" - [email protected] " " - [email protected] - [email protected] "Query" - [email protected] " " - [email protected] - [email protected] "{" - [email protected] "\n " - [email protected] - [email protected] - [email protected] "name" - [email protected] ":" - [email protected] " " - [email protected] - [email protected] - [email protected] "String" - [email protected] "\n" - [email protected] "}" - [email protected] "\n\n" - ERROR@33:37 "expected definition" cats
Initially found in #324
The text was updated successfully, but these errors were encountered:
Retain errors in the parse tree
eac6794
One way to fix #325
68063e8
Closing this in favour of follow-ups: #450 and #451
Sorry, something went wrong.
goto-bus-stop
No branches or pull requests
Our error spans are inconsistent when an error is created with
err_and_pop
.A few examples.
GraphQL:
Document:
GraphQL:
Document:
This no longer becomes the case when the error precedes a valid statement, so if we reverse the two statements above:
Our Document's spans are then correct:
Initially found in #324
The text was updated successfully, but these errors were encountered: