-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Print minified location #1985
Print minified location #1985
Conversation
GraphQL request:1:53 | ||
1 | query SomeMiniFiedQueryWithErrorInside($foo:String!=FIRST_ERROR_HERE$bar:String) | ||
| ^ | ||
| {someField(foo:$foo bar:$bar baz:SECOND_ERROR_HERE){fieldA fieldB{fieldC fieldD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Queries, particularly when compressed, can have a long line length. In narrow viewports (small Terminal windows, etc.) this results in the query wrapping over multiple lines.
@jaydenseric I think, I finally figured out a generic solution to the problem that you described in #1786. This test (+ 2 test cases below) shows the new format handles error location in the beginning, in the middle and in the end of the minified document.
What do you think?
@alloy Since we already changed error format in #1949 and I assume some of GraphQL tools/libraries will probably need to update their test suites. I decided to also address this issue to batch all changes in a single release. |
@IvanGoncharov Follow-up is at facebook/relay#2784 and works well 👍 |
Context: #1786