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

Not reading env variable correctly for schemaPath in .graphqlconfig file #623

Closed zorzysty closed 1 year ago

zorzysty commented 1 year ago

Describe the bug When "schemaPath": "${env:GRAPHQL_SCHEMA_PATH}", line is added to .graphqlconfig, it tries to create a file actually named ${env:GRAPHQL_SCHEMA_PATH}:

image

At the same time, it correctly reads the env variables in "Authorization": "Bearer ${env:GRAPHQL_AUTH_TOKEN}" and "url": "${env:GRAPHQL_ENDPOINT_URL}",

To Reproduce

  1. Create .env file
  2. Add this line: GRAPHQL_SCHEMA_PATH="schema.graphql" to .env file
  3. Add this line: "schemaPath": "${env:GRAPHQL_SCHEMA_PATH}", to .graphqlconfig file
  4. Run introspection

Expected behavior Schema should be created in a file named schema.graphql. Instead it's created in a file literally called ${env:GRAPHQL_SCHEMA_PATH}.

Version and Environment Details Operating system: Fedora 36 IDE name and version: Webstorm 2022.2.3 Plugin version: 3.3.0