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

[Bug] subscription request sends connection_init twice, once without connectionParams #216

Open
adrian-skybaker opened this issue Dec 22, 2022 · 0 comments

Comments

@adrian-skybaker
Copy link

I have a server implementing the graphql-ws protocol that is enforcing a JWT is present in the connection_init payload under connectionParams.token, as per enisdenjo/graphql-ws#263 .

In Apollo Studio I can add this token to the list of headers in the connection settings, with the expectation these are added to connectionParams sent with the subscription.

What I observe is two separate connection_init requests are made, one without the token and one with. If I reject the one without the token, the second connection_init request is not made, and the subscription fails. If I allow the first connection to occur (by returning connection_ack), the second one with the correct payload proceeds and the subscription succeeds.

I would expect a single connection_init request to be made with the headers present. The current behaviour means that a websocket API that requires authentication as part of connection_init is not useable from Apollo Studio.

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

1 participant