You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
It's pretty common to use multiline strings in kotlin to write a graphql document in code. When a variable is needed, the only way to make $ (dollar sign) escaped in the multiline string is using the literal representation like the following:
To Reproduce
Link to Repo with Reproduction or Steps to Reproduce:
(see the above example code)
Expected behavior
A clear and concise description of what you expected to happen.
The GraphQL IntelliJ plugin should be able to handle ${'$'} in kotlin multiline string as it's a very common use case.
Screenshots
If applicable, add screenshots to help explain your problem.
Version and Environment Details
Operation system: MacOS Sonoma Version 14.5
IDE name and version: IntelliJ IDEA 2024.1.2 (Ultimate Edition)
Plugin version: 241.14494.150
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
This can be worked around by converting the string to a raw string (and removing the escape characters).
It seems as if there should be some sort of translation layer between the source code (Kotlin, Dart, etc) and the graphql that could be used to un-escape the string.
On a related note, it would be nice if we could use the plugin to write something like this (though this should probably be its own feature request):
final dynamicFields ="id, email";
final query =/* language=graphql */""" query ExampleQuery(\$email: String!) { userByEmail(email:\$email) { $dynamicFields } }""";
Before you create the issue
Describe the bug
A clear and concise description of what the bug is.
It's pretty common to use multiline strings in kotlin to write a graphql document in code. When a variable is needed, the only way to make $ (dollar sign) escaped in the multiline string is using the literal representation like the following:
However when
${'$'}
appears, the GraphQL IntelliJ plugin will no longer process the document and there is no syntax highlighting or autocompletion.If no variable used, everything works as expected, e.g. the following is fine
To Reproduce
Link to Repo with Reproduction or Steps to Reproduce:
(see the above example code)
Expected behavior
A clear and concise description of what you expected to happen.
The GraphQL IntelliJ plugin should be able to handle
${'$'}
in kotlin multiline string as it's a very common use case.Screenshots
If applicable, add screenshots to help explain your problem.
Version and Environment Details
Operation system: MacOS Sonoma Version 14.5
IDE name and version: IntelliJ IDEA 2024.1.2 (Ultimate Edition)
Plugin version: 241.14494.150
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: