Unable to print schema with gql and error is an SSL error
danizen opened this issue · comments
Describe the bug
gql-cli is not using SSL even when the endpoint URL clearly requests this.
To Reproduce
Steps to reproduce the behavior. Below, the API-Key header is redacted:
gql-cli --print-schema -d -H 'API-Key: NRAK-1TTZZQEJWB1QV1FJVD8ZRK4ZKHD' 'Accept: application/json' -- https://api.newrelic.com/graphql
I get a long backtrace, but the bottom line is as follows:
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.newrelic.com:443 ssl:False [Connection reset by peer]
Expected behavior
A clear and concise description of what you expected to happen.
When given a URL beginning with https, gql-cli
should enable SSL/TLS.
System info (please complete the following information):
- OS: MacOS
- Python version: Python 3.11.5
- gql version: 3.4.1
- graphql-core version: 3.2.3
Sorry, I cannot reproduce it on my machine.
Running your command: gql-cli --print-schema -d -H 'API-Key: NRAK-1TTZZQEJWB1QV1FJVD8ZRK4ZKHD' 'Accept: application/json' -- https://api.newrelic.com/graphql
with your redacted API KEY provide the schema.
Are you behind a corporate firewall or something that could mess with SSL?