Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Allow dynamic URL #847

Closed
wants to merge 4 commits into from
Closed

Conversation

paulrostorp
Copy link

@paulrostorp paulrostorp commented Feb 4, 2021

This PR allows setting the url to be a function that returns a string rather than a static string.

Why?
Our organization authenticates websocket connection at the edge by parsing a jwt passed as a query parameter. When that token expires it should be reflected in the connection url.
With this change, whenever the websocket client reconnects, it will execute the function provided by the user rather than being stuck with the static string.

TODO:

  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change

@apollo-cla
Copy link

@paulrostorp: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@paulrostorp paulrostorp marked this pull request as ready for review February 4, 2021 10:41
@paulrostorp paulrostorp changed the title Make url dynamic Allow dynamic URL Feb 4, 2021
@ebisbe
Copy link

ebisbe commented Feb 13, 2022

I'd kill do anything for that

@paulrostorp @apollo-cla any idea if this can be merged?

@glasser
Copy link
Member

glasser commented Feb 15, 2022

This repository hasn't been actively maintained for years. You should use https://www.npmjs.com/package/graphql-ws instead. We are actively working on ensuring that all parts of the Apollo platform that support or semi-support subscriptions work with the newer package, at which point this repository will be archived; target is the end of the month. Follow our progress at apollographql/apollo-server#6058

@ebisbe
Copy link

ebisbe commented Feb 15, 2022

@glasser Yeah, I know. The issue is that I'm using Aws Appsync and from what I've read the WS implementation is not compatitble with graphql-ws ( here the link enisdenjo/graphql-ws#241 (comment) ).

@glasser
Copy link
Member

glasser commented Feb 15, 2022

I hope AppSync is able to switch over too, but if they want to keep using this protocol indefinitely they're welcome to fork the package.

@glasser glasser closed this Mar 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants