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

PerConnectionApolloHandler sends wrong sub-protocol #147

Open
westito opened this issue Apr 27, 2024 · 3 comments
Open

PerConnectionApolloHandler sends wrong sub-protocol #147

westito opened this issue Apr 27, 2024 · 3 comments

Comments

@westito
Copy link

westito commented Apr 27, 2024

I tried subscribe with Postman but it fails with Server sent no subprotocol:

Képernyőfotó 2024-04-27 - 16 39 11

I found that the client sends graphql-transport-ws sub-protocol but server only tests to graphql-ws because getSubProtocols() return only that. The official protocol is the graphql-transport-ws as you see here: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md

@westito
Copy link
Author

westito commented Apr 27, 2024

Meanwhile I realised the implemented protocol simply older than the currently recommended that Postman uses.

@kaqqao
Copy link
Member

kaqqao commented Apr 28, 2024

Yes, true. I figured there's no point in implementing the new protocol in SPQR since Spring itself already does. I'll release SPQR Starter 2.0.0.rc1 soon, possibly even today. The new version removes SPQR's entire communication layer and uses Spring directly. This will obviously be a breaking change, but it shouldn't cause too much trouble.
In the meantime, it's possible to already use Spring for communication with the current SPQR starter. I've been using it in production like that myself ever since Spring for GraphQL was released. It's pretty straightforward, I can post an example later.

@swwun
Copy link

swwun commented Nov 12, 2024

Yes, true. I figured there's no point in implementing the new protocol in SPQR since Spring itself already does. I'll release SPQR Starter 2.0.0.rc1 soon, possibly even today. The new version removes SPQR's entire communication layer and uses Spring directly. This will obviously be a breaking change, but it shouldn't cause too much trouble. In the meantime, it's possible to already use Spring for communication with the current SPQR starter. I've been using it in production like that myself ever since Spring for GraphQL was released. It's pretty straightforward, I can post an example later.

Hi @kaqqao, is there any update on this, by any chance? It would be great if there is an example to use Spring for communication with the current SPQR starter.

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

No branches or pull requests

3 participants