Open 0xdevalias opened 6 years ago
I can confirm I'm having the same problem
I can also confirm this problem. I would like the headers in the HTTP Headers UI section to be sent via the subscription websocket connection. I need this for Authorization using a Bearer token.
Edit: for example the GraphQL client lib for Python can do this:
sample_transport = WebsocketsTransport(
url='wss://SERVER_URL:SERVER_PORT/graphql',
headers={'Authorization': 'token'}
)
I can confirm having this problem as well.
This issue pertains to the following package(s):
What OS and OS version are you experiencing the issue(s) on?
macOS Mojave 10.14
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
1.7.0
What is the expected behavior?
When I have an AWS AppSync GraphQL API protected by an
API_KEY
(set in thex-api-key
http header), the subscription should connect to the websocket properly.What is the actual behavior?
An error is received, being unable to connect:
I believe this is occurring because the API key isn't sent, and thus it receives a 401 unauthorized response.
What steps may we take to reproduce the behavior?
Create an AWS AppSync GraphQL API protected with an API_KEY and try and subscribe to it.