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

chore: graphql ws2 #1618

Closed
wants to merge 1 commit into from
Closed

chore: graphql ws2 #1618

wants to merge 1 commit into from

Conversation

nicolasburtey
Copy link
Member

@nicolasburtey nicolasburtey commented Sep 1, 2022

fix #1365, plus some security consideration using the old library: enisdenjo/graphql-ws#3

I ran into issues when I was importing both subscriptions-transport-ws and graphql-ws at the same time. instead of trying to understand the root of this, I decided to duplicated graphql-server and dynamically, at runtime, one or the other websocket library would be used.

by default the old library would be used - so that we can enable the use of the new library in another PR in the charts/deployment repo.

I recommend that we use a new url for BBW to do the migration from the mobile app. we could use api.bbw.sv to replace the current url. api.bbw.sv would have the graphql-ws library. mainnet.graphql.galoy.io would have the subscriptions-transport-ws library.

legacy server (when no env variable is set) --> api.mainnet.galoy.io
"new" server (when NEW_SERVER is set) --> api.bbw.sv

note: I didn't see there was a way to do backward compability with both subscription services

ws server usage with subscriptions-transport-ws backwards compatibility

@nicolasburtey nicolasburtey force-pushed the graphql-ws2 branch 3 times, most recently from 3b21e77 to 8c9557b Compare September 1, 2022 18:06
@nicolasburtey
Copy link
Member Author

may need to replaced with https://github.com/enisdenjo/graphql-ws

look at code example with #ws server usage with subscriptions-transport-ws backwards compatibility

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

Successfully merging this pull request may close these issues.

switch to new graphql subscription protocol
1 participant