JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
879 stars 97 forks source link

Add support for multiple operations #712

Closed PvtPuddles closed 2 months ago

PvtPuddles commented 2 months ago

I would like the GraphQL plugin to support having multiple operations in a single scratch file.

For example, I may have a file that looks like this:

query getUser ($id: Int!) {
    user(id: $userId) {
        id, name
    }
}

mutation updateUser ($id: Int!, $newName: String!){
    updateUser(id: $userId, name: $newName)
}

Ideally, I would like a run button in the gutter for each operation in the file.

Additionally, I would like a dropdown menu when I click the existing run button to select the desired operation, similar to the GraphQL Playground on the web.

PvtPuddles commented 2 months ago

I didn't realize that the query is selected according to where your mouse cursor is.

I will close the issue.