Skip to content
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

Does not support invalid SSL certificates #14

Open
theogravity opened this issue Nov 12, 2017 · 2 comments
Open

Does not support invalid SSL certificates #14

theogravity opened this issue Nov 12, 2017 · 2 comments

Comments

@theogravity
Copy link

theogravity commented Nov 12, 2017

Needs to have an option to enable this for local dev purposes

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'
{ FetchError: request to https://localhost:3045/dev/graphql failed, reason: unable to verify the first certificate
    at ClientRequest.<anonymous> (/Users/t.gravity/.nvm/versions/node/v8.9.1/lib/node_modules/get-graphql-schema/node_modules/node-fetch/index.js:133:11)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
  name: 'FetchError',
@MartinDawson
Copy link

"get-schema:dev": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 graphql get-schema dev",

@LucasCalazans
Copy link

Using the @MartinDawson idea, we can use the same strategy on CLI

npm install -g get-graphql-schema
NODE_TLS_REJECT_UNAUTHORIZED=0 get-graphql-schema GRAPHQL_ENDPOINT > schema.graphql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants