graphdoc icon indicating copy to clipboard operation
graphdoc copied to clipboard

Unable to generate doc when secure server uses self signed certificate

Open timur560 opened this issue 8 years ago • 3 comments

Trying to generate a documentation for graphql server which has a self signed certificate. Terminal output:

$ graphdoc --verbose -e https://..../graphql -o . -x "Authorization: Bearer xGe2tZfpq4...lipMrCh" --force
 ✗ self signed certificate
Error: self signed certificate
    at TLSSocket.<anonymous> (_tls_wrap.js:1098:38)
    at emitNone (events.js:105:13)
    at TLSSocket.emit (events.js:207:7)
    at TLSSocket._finishInit (_tls_wrap.js:628:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:458:38)

Is there an option to enable fetching a schema from such GraphQL API server?

timur560 avatar Nov 28 '17 08:11 timur560

I will add an extra parameter --insecure in a future version to cover these cases

At the moment you can try with NODE_TLS_REJECT_UNAUTHORIZED=0 graphdoc ...

2fd avatar Nov 28 '17 15:11 2fd

Thanks a lot This works for me:

$ export NODE_TLS_REJECT_UNAUTHORIZED=0
$ graphdoc ...

timur560 avatar Nov 29 '17 12:11 timur560

@2fd when would this feature be available in an official release ?

bastos71 avatar Aug 06 '18 11:08 bastos71