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 support #110

Closed
szantogab opened this issue May 9, 2018 · 6 comments
Closed

Subscription support #110

szantogab opened this issue May 9, 2018 · 6 comments

Comments

@szantogab
Copy link

Is this library capable of supporting subscriptions at the moment ? And if not, is this feature on the roadamp?

@kaqqao
Copy link
Member

kaqqao commented May 9, 2018

Yes, subscriptions are supported already.
Your resolver method needs to return a Publisher<Something> and you'll receive a Publisher<ExecutionResult> in the end. If you're using annotations, the you're looking for is @GraphQLSubscription.

From there, see the graphql-java WebSocket example, this cool pull request using SPQR, or wait for me to finally push the GraphQL SPQR Spring Boot Starter example (which uses Reactor for this).

@kaqqao
Copy link
Member

kaqqao commented May 9, 2018

If you end up implementing something, please contact me. I'm very interested in how subscriptions are used, especially what clients and transports.

@szantogab
Copy link
Author

Sound awesome, when do you plan to release the Spring Boot Starter ?

@kaqqao
Copy link
Member

kaqqao commented May 9, 2018

Ah, the starter is already out! 😄 https://github.com/leangen/graphql-spqr-spring-boot-starter

It's just the sample that I haven't pushed yet.
Will try to clean it up an push it tonight.

@kaqqao
Copy link
Member

kaqqao commented May 10, 2018

Ok, wow, I actually forgot I had already pushed the sample a while ago 😌
You can see a subscription sample using Reactor (and WebSocket) here. IssueService is the class firing events.

@kaqqao
Copy link
Member

kaqqao commented May 12, 2018

I'll close this one as it seems all the questions have been addressed. If not, please reopen.

@kaqqao kaqqao closed this as completed May 12, 2018
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

2 participants