Giter VIP home page Giter VIP logo

Comments (7)

divyenduz avatar divyenduz commented on April 28, 2024

Interesting, thanks for reporting.

Can you try the .env file value without the quotes?
Like: AUTH_TOKEN_ENV=xxx

from vscode-graphql.

jensfranke avatar jensfranke commented on April 28, 2024

@divyenduz Yes, it works. Thanks. But than other packages can not handle the values. I believe with quotes is the default.

from vscode-graphql.

jensfranke avatar jensfranke commented on April 28, 2024

hi @divyenduz, it is possible to allow also values in quotes?

from vscode-graphql.

divyenduz avatar divyenduz commented on April 28, 2024

Not yet I think based on this issue. I will need to investigate that.

from vscode-graphql.

jensfranke avatar jensfranke commented on April 28, 2024

@divyenduz thanks in advance - currently it also don't work for me without quotes.

from vscode-graphql.

CoenWarmer avatar CoenWarmer commented on April 28, 2024

Can verify that this is happening.

My .graphqlconfig.yml:

projects:
  foo:
    schemaPath: schema.graphql
    includes: ["**/*.{graphq}"]
    extensions:
      endpoints:
        default:
          url: ${env:GRAPHQL_API}
          headers:
            Authorization: "Bearer ${env:GRAPHQL_TOKEN}"

graphql get-schema downloads the schema without issue. However the VSCode plugin does not seem to validate queries. When I enter the token in the yml file directly, the plugin does work.

My .env file by the way does not use quotes around both values.

I have tried:

  • Converting from yaml to json
  • Adding quotes or removing in .env file
  • Adding quotes or removing in config file
  • Removing one of env variables mentioned in the config

The only thing that works for me is not using {env:ENV_VARIABLE} at all. And just to reiterate, graphql get-schema does indeed retrieve the schema when I use {env:etc} in the config, so the settings should be correct.

Also, I'm on Mac. Perhaps the .env file can't be loaded by the plugin on Mac?

from vscode-graphql.

divyenduz avatar divyenduz commented on April 28, 2024

A fix for this is available in 0.1.8 via #98

from vscode-graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.