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

Likely bug in extractGraphQLDocumentsFromJSTemplateLiterals #1050

Closed
trevor-scheer opened this issue Feb 25, 2019 · 2 comments
Closed

Likely bug in extractGraphQLDocumentsFromJSTemplateLiterals #1050

trevor-scheer opened this issue Feb 25, 2019 · 2 comments
Labels
🐞 bug 🤖 component - codegen related to the codegen core packages 🥇 good-first-issue Issues that are suitable for first-time contributors.

Comments

@trevor-scheer
Copy link
Member

See:

const position = document.positionAt(result.index + 4);

There's probably an issue with the magical +4 here, it seems to be assuming the length of gql`, but we support custom tagNames in the function.

A simple breaking test + fix would be a very simple approach to demonstrating this bug and resolving.

Thanks @glasser for reporting!

@trevor-scheer trevor-scheer added 🐞 bug 🥇 good-first-issue Issues that are suitable for first-time contributors. 🤖 component - codegen related to the codegen core packages labels Feb 25, 2019
@rlarcher
Copy link
Contributor

rlarcher commented Jun 7, 2019

Sure, I have a PR for this here with a simple test #1326

@trevor-scheer
Copy link
Member Author

Closed in #1326, thanks @rlarcher!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug 🤖 component - codegen related to the codegen core packages 🥇 good-first-issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

No branches or pull requests

2 participants