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

Print minified location #1985

Merged
merged 2 commits into from Jun 25, 2019

Conversation

IvanGoncharov
Copy link
Member

Context: #1786

@IvanGoncharov IvanGoncharov added the PR: feature 🚀 requires increase of "minor" version number label Jun 15, 2019
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.
Copy link
Member Author

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?

@IvanGoncharov
Copy link
Member Author

IvanGoncharov commented Jun 15, 2019

@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.
Can you please review this PR and check if this change will be compatible with Relay?

@IvanGoncharov IvanGoncharov merged commit d8c1dfd into graphql:master Jun 25, 2019
@IvanGoncharov IvanGoncharov deleted the printMinifiedLocation branch June 25, 2019 14:37
@alloy
Copy link
Contributor

alloy commented Jun 26, 2019

@IvanGoncharov Follow-up is at facebook/relay#2784 and works well 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature 🚀 requires increase of "minor" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants