Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change runtime variable after first time #691

Open
lorthirk opened this issue Sep 20, 2023 · 8 comments
Open

Unable to change runtime variable after first time #691

lorthirk opened this issue Sep 20, 2023 · 8 comments

Comments

@lorthirk
Copy link

Before you create the issue

  • If you're using an EAP, try with a stable version. If that works, please mention it in the issue along with both versions
  • Please search the existing issues before opening a new issue
  • Review the developer guide

Describe the bug
I have a TOKEN variable defined in my graphql.config.yml file so that I can pass a JWT Token when I make some calls. After I enter it the first time (by pressing Cmd+Enter on a query defined in a .graphql file), I cannot change it anymore because clicking the "Edit Environment Variables" shows the variable with an empty value, and changing it doesn't have any effect.

To Reproduce
Link to Repo with Reproduction or Steps to Reproduce:

  1. Create a variable in config.graphql.yml
  2. Perform a GraphQL query/mutation
  3. Set a value for that variable and run the operation
  4. Open the "Edit Environment Variables" button to change the value

Expected behavior
The "Edit Environment Variables" window opens with the variable with the old value, allowing to change its value

Version and Environment Details
Operation system: macOS Ventura 13.5.1
IDE name and version: IntelliJ Ultimate 2023.2.2
Plugin version: 4.0.2

@kajmaj87
Copy link

I have the exact same issue.

Version and Environment Details
Operation system: Linux fedora 6.5.5-100.fc37.x86_64
IDE name and version: IntelliJ Ultimate 2023.2.3
Plugin version: 4.0.2

@vepanimas
Copy link
Collaborator

I'll fix it in the upcoming 2023.3 release.

@lorthirk
Copy link
Author

If you want I can open a different issue for a different feature, but IMHO it would be great to have the variable saved somehow with the .graphql file, so that I don't have to populate them every time I restart IntelliJ.

@vepanimas
Copy link
Collaborator

@lorthirk if you want to persist the variables, why don't just create an .env file? Here is the docs.

@lorthirk
Copy link
Author

@lorthirk if you want to persist the variables, why don't just create an .env file? Here is the docs.

Uhm... I was still thinking about input variables rather than envs. Sounds impractical to pollute the envs with objects to be used as inputs in queries, especially when I have many queries.

@vepanimas
Copy link
Collaborator

@lorthirk I created an issue for that 👍

@lorthirk
Copy link
Author

I'm sorry, I realize now I was not clear.

In my second comment I was referring to input variables, the ones with the yellow "V" button, not environment variables.

@vepanimas
Copy link
Collaborator

Ah, my bad. For that one, we already have an issue with a long history #83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants