Updating a GraphQL query to add a variable silently clears all existing variable values

Repro steps:

  1. Create a GraphQL query with one or more (mandatory) variables specified.
  2. Confirm that the query can run successfully.
  3. Edit the query to add a new variable.
  4. Run the query or reload the editor.

Expected

The query succeeds, and all the existing variable values are kept after reloading at the step 4.

Actual

The query fails (because the mandatory variables are unspecified), and all the existing variable values are cleared after reloading at the step 4.

A repro video showing adding  variable clears the value of an existing  variable

1 Like

Hi @masaru-iritani Thanks for reporting this! I will reach out when our team is able to ship a fix for this bug. I know it is not ideal, but are you able to re-add the variables in order to move forward?

Thank you for your response, Tess! Yes, I can re-add and reconfigure variables after removing existing stale ones or reloading the editor.

I hope it gets fixed soon because our team has already broken apps many times due to this problem :pray: