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
Extension configuration through .env files, is it possible? #80
Comments
@mauro-ni you should check out our documentation on configuring the vscode extension. I believe it will answer your question. |
@jpvajda many thanks for the replay.
Is this possible? Many thanks in advance! Mauro |
@mauro-ni did this setup not work for you? https://www.apollographql.com/docs/devtools/apollo-config/#server-projects Specifically Option 1, for a remote endpoint. |
@jpvajda if i put the url directly in .env
apollo.config.js
Is it possible to load the .env file and use the defined variable in Many thanks, |
@mauro-ni I see. For what reason specifically? Isn't the URL public? What concerns do you have with the URL being in the |
@jpvajda URL is public. The main reasons for this requirement are:
Many thanks in advance, |
@mauro-ni gotcha, thanks for clarifying. I'll label this as an enhancement and we can consider it for the future. We accept PRs as well , I think the code that needs to change is located in this file, and we look to have a test for the values as well. If you want to try to add this improvement we'd be happy to review the PR for you. |
Hey @jpvajda, Wanted to say I have the same issue. Given that we had to save API's URL as an environment variable I had to either hardcode the URL here and ask the others to change it or just yet not use the extension. second option selected for the time being but I'll be happy to help if you can give me a clue where to start with. Thanks! |
Hi,
I have a React application and I use ViteJs as a Front End Tooling.
My application is configured through .env files: in these files I also put the url to the GraphQl service (backend).
How can I read the GraphQl service url from .env files and properly setup
apollo.config.js
file?Is it possible?
Could you please provide an example?
Many thanks in advance,
Mauro
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: