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

Sub-protocol not included when opening websocket [4.0.0-beta6] #5946

Closed
isaacmanu opened this issue Jun 5, 2024 · 3 comments · Fixed by #5948
Closed

Sub-protocol not included when opening websocket [4.0.0-beta6] #5946

isaacmanu opened this issue Jun 5, 2024 · 3 comments · Fixed by #5948

Comments

@isaacmanu
Copy link

isaacmanu commented Jun 5, 2024

Version

4.0.0-beta6

Summary

I'm trying to migrate our project to 4.0.0-beta6.

I've replaced:

import com.apollographql.apollo3.network.ws.GraphQLWsProtocol
import com.apollographql.apollo3.network.ws.WebSocketNetworkTransport

.subscriptionNetworkTransport(
                WebSocketNetworkTransport.Builder()
                    .serverUrl(BASE_URL)
                    .protocol(GraphQLWsProtocol.Factory())
                    .build()
            )

With:

import com.apollographql.apollo3.network.websocket.GraphQLWsProtocol
import com.apollographql.apollo3.network.websocket.WebSocketNetworkTransport

.subscriptionNetworkTransport(
                WebSocketNetworkTransport.Builder()
                    .serverUrl(BASE_URL)
                    .wsProtocol(GraphQLWsProtocol())
                    .build()
            )

But whenever our app attempts to open a websocket now, it does so without the including any sub protocol:
Screenshot 2024-06-05 at 13 14 00

@martinbonnin
Copy link
Contributor

Thanks for sending this, we'll dig into it.
Just FYI, you can continue using the com.apollographql.apollo3.network.ws APIs if they worked well before, they are still around. But we'll definitely want to send that subprotocol for the new version.

@martinbonnin
Copy link
Contributor

Fix is in #5948. Thanks for catching this!

Copy link
Contributor

github-actions bot commented Jun 5, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants