graphdoc
graphdoc copied to clipboard
Unable to generate doc when secure server uses self signed certificate
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?
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 ...
Thanks a lot This works for me:
$ export NODE_TLS_REJECT_UNAUTHORIZED=0
$ graphdoc ...
@2fd when would this feature be available in an official release ?