firecamp-io / firecamp

VSCode for APIs, Postman Alternative.
https://firecamp.dev
317 stars 22 forks source link

Variable value is set to null when default argument value is added or deleted #140

Closed pavelsaman closed 2 years ago

pavelsaman commented 3 years ago

Describe the bug

When I add or delete default argument value, variable value is set to null. See the video below for more details.

To Reproduce

  1. I use the following query:
    
    query MultipleSpeakers($limit: Int) {
    speakerOne: speakers(name: "Pavel") {
    ...SpeakerBody
    }
    speakerTwo: speakers(name: "Petr") {
    ...SpeakerBody
    }
    }

fragment SpeakerBody on Speaker { id firstName lastName statements(limit: $limit) { content } }


and variables:

{ "limit": 7 }


2. Add default argument value to $limit variable, so the result is something like this:

query MultipleSpeakers($limit: Int = 1) { speakerOne: speakers(name: "Pavel") { ...SpeakerBody } speakerTwo: speakers(name: "Petr") { ...SpeakerBody } }

fragment SpeakerBody on Speaker { id firstName lastName statements(limit: $limit) { content } }


3. See in Variables panel that the variable has been set to null

The same goes when I'm deleting a default argument value.

**Expected behavior**

Preserve variable values in Variable panel.

**Screenshots 0r Video**

![bug_1](https://user-images.githubusercontent.com/24702416/102397600-5ff34480-3fde-11eb-882f-f05648d82d99.gif)

**Platform:**
 - Type: desktop, installed via snap
 - OS: Manjaro 20.2
 - Firecamp Version: v1.4.4
Nishchit14 commented 3 years ago

Thank you @pavelsaman for testing Firecamp. would you like to try a Firecamp canary v2? It's privately available now. Please do let me know where I can share it with you, via email, discord, or another way?

pavelsaman commented 3 years ago

Thank you @pavelsaman for testing Firecamp. would you like to try a Firecamp canary v2? It's privately available now. Please do let me know where I can share it with you, via email, discord, or another way?

I'd like to try it, you can share it with me over my email pavelsam@centrum.cz Thank you

pranavwani commented 2 years ago

Issue was fixed in previous release