Describe the bug
Often I have multiple queries or mutations within a single graphql file for testing purposes or as examples of how to use a particular operation.
In previous versions of the GraphQL plugin, if I had multiple queries or mutations in a graphql file, pressing Ctrl-Enter would execute only the query or mutation under the cursor, similar to the way SQL queries are executed in the database console. However, now when I hit the same keyboard combination, the plugin is attempting to send the entire file/buffer.
To Reproduce
Assume a graphql file that looks something like this:
query someQuery {
doSomeQuery {
id name created
}
}
query anotherQuery {
anotherQuery {
id title
}
}
someQueryControl-Enter{
"errors": [
{
"message": "Must provide operation name if query contains multiple operations.",
"extensions": {
"code": "INTERNAL_SERVER_ERROR"
}
}
]
}
Expected behavior
I would expect only the single query (someQuery) to be sent to the graph server and executed.
Version and Environment Details
Operation system: MacOS 10.14.6
IDE name and version:
IntelliJ IDEA 2020.2.3 (Ultimate Edition)
Build #IU-202.7660.26, built on October 6, 2020
Runtime version: 11.0.8+10-b944.34 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 16
Non-Bundled Plugins: com.github.novotnyr.jwt-intellij-plugin, com.jetbrains.plugins.ini4idea, org.intellij.plugins.hcl, com.intellij.react.css.modules, org.jetbrains.kotlin, com.intellij.lang.jsgraphql, com.jetbrains.php, com.vexus2.cakestorm, Pythonid, ru.meanmail.plugin.requirements, org.jetbrains.plugins.go
Plugin version: 2.7.0
Having the same issue recently. Previously works as expected, but placing the cursor anywhere inside an operation and clicking ctrl+enter runs the entire file. I've been having to select the operation using the cursor then press ctrl+enter in order to achieve the same functionality as it used to have.
Doesn't work on new version of Idea.
When I want to send one of the operation, I put a caret on that operation, but the whole file is sent.
Expected behavior
Placing caret inside an operation and pressing Ctrl+Enter should send only this operation
PS: I confirm that if you select the required operation, only that operation is sent. But this is very inconvenient.
Version and Environment Details
Operation system: mac OS BigSur 11.2 (20D64)
IDE name and version: IntelliJ IDEA 2020.3.2 (Ultimate Edition) Build #IU-203.7148.57
Plugin version: 2.7.1
Same issue on MacOS BigSur 11.1, IDEA 2020.3.3 Pro, Plugin 2.7.1
Selecting an entire query and hitting CMD+ENTER sends just that query.
However, this fails if the query includes ...fragment specifiers, even when these are in the same buffer.
Fixed, will release it approximately during this week.
小锌邪褋懈斜芯, 袙芯谢芯写褜!
Most helpful comment
Fixed, will release it approximately during this week.