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

Initial connection to "Subscription Endpoint" missing headers #306

Open
leeamoore opened this issue Oct 15, 2024 · 0 comments
Open

Initial connection to "Subscription Endpoint" missing headers #306

leeamoore opened this issue Oct 15, 2024 · 0 comments

Comments

@leeamoore
Copy link

I'm using the ApolloSandbox embedding in my application. It's been great! It's been my favorite GraphQL playground interface that I've used.

I'm running into an issue with subscriptions. During the initial connection when making a GraphQL subscription query, the shared headers are not passed in the initial payload of the graphql-ws request. Further, this failure causes my embedding of the GraphQL Explorer to retry the graphql-ws request in an infinite loop due to the authentication failure from a missing authentication token in the initial payload. Setting the subscription implementation to graphql-ws instead of "Auto-detect" before sending the initial requests prevents this issue from happening.

Is there a way to set the subscription implementation in the props of ApolloSandbox? If not, it would be nice to have that option. I'm happy to submit a PR for this if I can get pointed in the right direction.

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