apollographql / apollographql/embeddable-explorer
Initial connection to "Subscription Endpoint" missing headers
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the ApolloSandbox props and the subscription implementation selection used for graphql-ws connections. Trace the initial graphql-ws request and shared-header handling; done means consumers can select the subscription implementation through ApolloSandbox props and the selected implementation works without the reported authentication retry loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100