You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When behind a corporate proxy, the extensions fails at startup with this error message:
[Network Error]: FetchError: request to https://graphql.api.apollographql.com/api/graphql failed, reason: connect ETIMEDOUT
ApolloError: request to https://graphql.api.apollographql.com/api/graphql failed, reason: connect ETIMEDOUT
Same project works just fine when not behind the proxy.
Things I've tried:
In vscode, changing values for the following settings:
Setting http.proxy to the proxy value
Enabling and disabling http.proxyAuthorization
Enabling and disabling http.proxyStrictSSL
Setting http.proxySupport to 'on'
In the .env file, setting the following values:
http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY
GLOBAL_AGENT_HTTPS_PROXY
global_agent_https_proxy
Setting the following environment variables:
http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY
GLOBAL_AGENT_HTTPS_PROXY
global_agent_https_proxy
Looking at the code, I couldn't find any evidence of proxies being supported, libraries like https-proxy-agent or global-agent are not being used.
The only way I could get the proxy to work was by hacking direct access to my proxy in src/env/fetch/fetch.ts:
const agent = new (HttpsProxyAgent as any)("http://proxy.company.com:8080");
function proxyFetch(url: RequestInfo, options: RequestInit | undefined) {
return fetch(url, {
...options,
agent,
});
}
export { proxyFetch as fetch };
export {
Request,
Response,
Headers,
ResponseInit,
BodyInit,
RequestInfo,
HeadersInit,
Body,
RequestInit,
RequestMode,
RequestCredentials,
RequestCache,
RequestRedirect,
} from "node-fetch";
Once I've done that, then the Apollo GraphQL status shows the schema as loaded.
Is there a setting, in vscode, the extension or in my environment that I am missing in order to use the extension behind a corporate proxy, or is it simply not supported?
Hello,
When behind a corporate proxy, the extensions fails at startup with this error message:
Same project works just fine when not behind the proxy.
Things I've tried:
Setting http.proxy to the proxy value
Enabling and disabling http.proxyAuthorization
Enabling and disabling http.proxyStrictSSL
Setting http.proxySupport to 'on'
http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY
GLOBAL_AGENT_HTTPS_PROXY
global_agent_https_proxy
http_proxy
https_proxy
HTTP_PROXY
HTTPS_PROXY
GLOBAL_AGENT_HTTPS_PROXY
global_agent_https_proxy
Looking at the code, I couldn't find any evidence of proxies being supported, libraries like
https-proxy-agent
orglobal-agent
are not being used.The only way I could get the proxy to work was by hacking direct access to my proxy in
src/env/fetch/fetch.ts
:Once I've done that, then the Apollo GraphQL status shows the schema as loaded.
Is there a setting, in vscode, the extension or in my environment that I am missing in order to use the extension behind a corporate proxy, or is it simply not supported?
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: