-
Notifications
You must be signed in to change notification settings - Fork 360
Support subscriptions #155
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
Comments
FYI I have a WIP branch here: https://github.com/smyrick/graphql-kotlin/tree/subscribtions I think we should update the example first to use the webflux as a demo, this can be done without supporting subscriptions but add them after will be much easier and help split up all the example changes I need to do to show how to use a publisher |
Whats the status of this? 🙄 |
@shahabio I had started working on the update but had trouble getting the example app working with spring websockets. If you want to pick up from my branch you can pull from here: https://github.com/smyrick/graphql-kotlin/tree/subscribtions |
@smyrick I looked into your branch a bit. At least in my testing, it looks like the issue might be with the headers coming back from the server. I'm getting this error and noticing that the headers are missing on the server response.
I'm still new to the Spring Boot environment, and largely to Kotlin, so I'm a bit stuck at that point. Looking at the graphql-java spring starter, it looks like they are modifying the handshake specifically to handle this. I'm not sure if there is an easier way to accomplish this or not. |
@camuthig When I run a subscription query through the playground and I put a breakpoint at the top of |
@smyrick I added the same breakpoint and agree that the header is there. However, when I use the dev console on Chromium to look at the response, I don't see it coming back on the response. The headers using graphql-spring-boot-autoconfigure look something like
But with your branch I'm seeing
|
With my latest branch I have successfully connected using the following Websocket client: https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo It looks like there is an issue with GraphQL Playground and Spring Webflux Websockets, specifically the
|
putting
in should fix the the protocol issue as |
Uh oh!
There was an error while loading. Please reload this page.
GraphQL Java can support subscriptions: https://www.graphql-java.com/documentation/v11/subscriptions/
We just need to come up with a good way to represent the different type in the schema.
This may be able to be done without a breaking change. Can we just add a
@GraphQLSubscription
?The text was updated successfully, but these errors were encountered: