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

Subscription on netty http not working #458

Closed
calebcodesgud opened this issue Aug 2, 2022 · 8 comments
Closed

Subscription on netty http not working #458

calebcodesgud opened this issue Aug 2, 2022 · 8 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@calebcodesgud
Copy link

I have a @SubscriptionMapping datafetcher which returns a flux. The data fetcher returns the flux to the client reactively when I run spring graphql on a websocket server and I'm happy with its performance. However, when I run spring graphql on netty webflux, the same datafetcher just returns:

{"data":{"upstreamPublisher":{"scanAvailable": true, "prefetch": -1}}}

and then terminates...

The only other reference to this that I can find is spring-projects/spring-boot#30052
This made against the spring projects repo by that developer and was closed for not providing enough information.

Please let me know if you need more from me. Thank you!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 2, 2022
@bclozel
Copy link
Member

bclozel commented Aug 2, 2022

Could you provide a sample application showing the issue? Ideally, an application created on https://start.spring.io, that we can git clone and run.

@bclozel bclozel added the status: waiting-for-feedback We need additional information before we can continue label Aug 2, 2022
@calebcodesgud calebcodesgud changed the title Subscription on netty http now working Subscription on netty http not working Aug 2, 2022
@calebcodesgud
Copy link
Author

@bclozel You can clone from here: https://github.com/calebcodesgud/sgql-streaming-issue/tree/main

Forgive the lack of a virtual environment please, I've included my jdk and maven version in the read me.
Please try running the application from local then run each of the unit tests. I was able to reproduce the same behavior with this.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 2, 2022
@bclozel
Copy link
Member

bclozel commented Aug 3, 2022

@calebcodesgud I think this was mostly an issue with the testing setup.
I've sent a PR to your sample repository, with various commits explaining the changes. See calebcodesgud/sgql-streaming-issue#1

I'm closing this as the feature works as expected. Thanks!

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2022
@bclozel bclozel added status: invalid An issue that we don't feel is valid and removed status: feedback-provided Feedback has been provided status: waiting-for-triage An issue we've not yet triaged labels Aug 3, 2022
@calebcodesgud
Copy link
Author

calebcodesgud commented Aug 3, 2022

@bclozel Changing the test implementation here doesn't really solve the issue as I see the same problem when the application is deployed and called via webclient... should I be using a different client to execute the http subscription?

@bclozel
Copy link
Member

bclozel commented Aug 3, 2022

We're shipping a dedicated client for that case. In your original project you were using a mix of graphql-kickstart and hand-made HTTP requests.
You can check that the server side behaves properly by calling it from the GraphiQL UI.

Also, currently only the WebSocket transport supports subscriptions.

@calebcodesgud
Copy link
Author

Thanks @bclozel ! is adding http subscription support in the roadmap at all?

@bclozel
Copy link
Member

bclozel commented Aug 3, 2022

@calebcodesgud Not right now, see this comment for more context.

@tjulioh
Copy link

tjulioh commented Aug 3, 2022

Same here, but I think we're trying to do get/post htpp request. It should be performed wss from what I understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants