Skip to content

Quickfix: create a variable declaration from an unresolved usage #617

@AustinAmoruso

Description

@AustinAmoruso

When you enter the arguments for mutation/query the plugin should be able to generate the appropriate variables based off the schema.

Given the following partial mutation, the arguments are filled in and a valid schema, the variables should be able to be generated

mutation createRole(){ # generate variables
    createRole(input: {id: $roleID, description: $description, teamID: $teamID, departmentID: $departmentID,active: $active,editable: $editable,levelID: $levelID, titleID: $titleID}){
        id
    }
}

Generated out come

mutation createRole($roleID: ID!, $description: String, $teamID:ID!, $departmentID: ID!,$active: Boolean!, $editable:Boolean!,$levelID: ID!, $titleID: ID!){
    createRole(input: {id: $roleID, description: $description, teamID: $teamID, departmentID: $departmentID,active: $active,editable: $editable,levelID: $levelID, titleID: $titleID}){
        id
    }
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions