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
880 stars 97 forks source link

Enable environment variables #602

Closed llehn closed 2 years ago

llehn commented 2 years ago

At the moment there seems to be no way to make the plugin use the value of environment variable, other than explicitly giving it via the "Enter missing variable..." dialog.

This basically turns the advertised functionality of using something like ${env:TOKEN} into something like ${SHOW_PROMPT} (or SHOW_PROMPT_1, SHOW_PROMPT_2, to support different values)

I saw the discussions about supporting env files, which IMHO totally have the wrong point - the concern which env files in which order should be applies is one which is not what this plugin is about.

I hope somebody corrects me and i'm just too stupid for not being able to find a way to use the enviroment variable (the thing that System.getenv() gets the value for)

psoares commented 2 years ago

The environment variables need to be set in your environment (e.g. globally, or within the shell from where you start intelliJ from the command line). How you set them depends on your OS.

llehn commented 2 years ago

They are set of course.

vepanimas commented 2 years ago

@llehn I fixed that, now env variables should be available.