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

Small bug fix: Correctly incorporate column offset in decorations #692

Merged

Conversation

patrys
Copy link
Contributor

@patrys patrys commented Nov 13, 2018

This fixes the case where error markers are placed incorrectly when an error refers to a range in the first line of inlined GraphQL.

Previously error locations (and thus editor decorations) would disregard the column offset. Error were reported like this:

foo = gql`query Foo { bar }`
            ^^^

This change makes the location add the column offset it referring to the first line:

foo = gql`query Foo { bar }`
                      ^^^

This fixes the case where error markers are placed incorrectly when an error
refers to a range in the first line of inlined GraphQL.
@apollo-cla
Copy link

@patrys: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@martijnwalraven martijnwalraven merged commit 5904bd8 into apollographql:master Nov 13, 2018
@martijnwalraven
Copy link
Contributor

Thanks a lot for tracking this down and fixing it, tests are especially appreciated!

@patrys patrys deleted the fix-position-from-source-location branch November 13, 2018 13:50
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.

3 participants