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

Apollo fragment placeholder in gql template literal removed during format lines #162

Closed
jakubkulhan opened this issue May 29, 2018 · 6 comments

Comments

@jakubkulhan
Copy link

After upgrading plugin to 1.7.1, when I run reformat, interpolations are removed from GraphQL template literals.

E.g. if I have such interpolation with fragment from other component:

snimek obrazovky 2018-05-29 v 10 41 48

and then I run reformat:

snimek obrazovky 2018-05-29 v 10 41 59

Interpolation of the fragment is removed from the literal.

@jimkyndemeyer
Copy link
Collaborator

Hi Jakub.

Thanks for reporting this.

I was initially unable to reproduce this, but it appears to be linked to the use of decorators.

jimkyndemeyer added a commit that referenced this issue May 29, 2018
@jimkyndemeyer jimkyndemeyer changed the title Template literals bug in 1.7.1 - removes interpolations Apollo fragment placeholder in gql template literal removed during format lines May 29, 2018
@jimkyndemeyer
Copy link
Collaborator

Hi Jakub.

This is fixed in 1.7.2, pending JetBrains approval.

@jakubkulhan
Copy link
Author

Thank you very much!

@laukaichung
Copy link

laukaichung commented May 31, 2018

I have the same problem when moving the template literals to another file especially when there are more than one fragment placeholders.

@jimkyndemeyer
Copy link
Collaborator

@stonecold123 Pasting into another file also triggers formatting, so the incoming fix should address this as well. JetBrains typically approves plugin updates within two days, so it's likely that the update will be available today.

@jimkyndemeyer
Copy link
Collaborator

Approved by JetBrains. The 1.7.2 update should be available now when searching for plugin updates.

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

No branches or pull requests

3 participants