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

Improve syntax error reporting for graphql macro #235

Closed
OlegIlyenko opened this issue Apr 27, 2017 · 0 comments
Closed

Improve syntax error reporting for graphql macro #235

OlegIlyenko opened this issue Apr 27, 2017 · 0 comments
Assignees
Milestone

Comments

@OlegIlyenko
Copy link
Member

OlegIlyenko commented Apr 27, 2017

Ideally the error position should point out the correct position inside of the GraphQL string.

Here is an example of error + position that should be reported:

[error] SchemaComparatorSpec.scala:77: Invalid input "typ ", expected OperationDefinition, FragmentDefinition or TypeSystemDefinition
[error]         typ Foo {
[error]         ^
[error] one error found
[error] (test:compileIncremental) Compilation failed

But currently it's reported as:

[error] SchemaComparatorSpec.scala:68: Invalid input "typ ", expected OperationDefinition, FragmentDefinition or TypeSystemDefinition (line 10, column 9):
[error]         typ Foo {
[error]         ^
[error]       graphql"""
[error]       ^
[error] one error found
[error] (test:compileIncremental) Compilation failed

which is quite confusing and points at the wrong location.

@OlegIlyenko OlegIlyenko added this to the v1.1.1 milestone Apr 27, 2017
@OlegIlyenko OlegIlyenko self-assigned this Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant