Skip to content

Combining graphql-ws with Apollo on the client side with single HTTP stream. #234

Answered by enisdenjo
AaronNGray asked this question in Q&A
Discussion options

You must be logged in to vote

"a single HTTP stream" passing Queries and Mutations over HTTP and Subscriptions over WebSockets.

Ah ok, I follow.

Your above example gives me the WebSocketLink to do that in the same ways as my subscriptions-transport-ws example

No, your example is not the same as suggested. Please remove the apollo-link-ws library completely and implement the WebSocketLink as described in the "Client usage with Apollo" recipe, then use it to instantiate the wsLink.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by enisdenjo
Comment options

You must be logged in to vote
1 reply
@enisdenjo
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants