apollo-tooling: schema publish error: read ECONNRESET
hi there, i am using the new apollo-cli to upload schema but aways get ECCONNRESET
error:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (4 by maintainers)
Commits related to this issue
- apollo: support proxy env vars Fixes #523. Fixes #1967. Fixes #1793. — committed to apollographql/apollo-tooling by glasser 4 years ago
- apollo: support proxy env vars Fixes #523. Fixes #1967. Fixes #1793. — committed to apollographql/apollo-tooling by glasser 4 years ago
- apollo: support proxy env vars (#2181) Fixes #523. Fixes #1967. Fixes #1793. — committed to apollographql/apollo-tooling by glasser 4 years ago
Workaround
Step 1
npm i -g proxy-agent
Step 2 append code below to
/usr/local/lib/node_modules/apollo/node_modules/apollo-env/lib/fetch/fetch.js
(this path is from my Mac, change global node_modules according to your system)Why command
apollo
depends onapollo-env
which usenode-fetch
node-fectch
can accept a agent option for proxy : https://www.npmjs.com/package/node-fetch#optionsproxy-agent
provides such agent (http,https,socks5,etc…) : https://github.com/TooTallNate/node-proxy-agentFor apollo-vscode
~/.vscode/extensions/apollographql.vscode-apollo-1.4.0/node_modules/apollo-env/lib/fetch/fetch.js
@sirkay777 ,Thanks,I update it as follow
set terminal proxy for mac
when want to proxy:
when want unuse proxy
I don’t know why this does not work. For me ,below is work!
Step 2
append code below to /usr/local/lib/node_modules/apollo/node_modules/apollo-env/lib/fetch/fetch.js (this path is from my Mac, change global node_modules according to your system)
For apollo-vscode
~/.vscode/extensions/apollographql.vscode-apollo-1.4.0/node_modules/apollo-env/lib/fetch/fetch.js
This issue should not be closed, we need something like
--proxy
flag orhttps_proxy
env.