-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(Subscriptions) add subscriptions #672
Conversation
25b3a75
to
f27cf09
Compare
37120e8
to
41f96e5
Compare
Feature-wise I think this is ready, but as I write the docs, I think the API can be better. Something more ... object-oriented 🙀 |
6ce1dc0
to
2c011f6
Compare
…n methods to hash
feat(Query::Result) add a first-class result object
…er -> Schema#subscriptions
5a92409
to
dce218f
Compare
Working on an ActionCable client rmosolgo/graphql-ruby-client#2 |
@rmosolgo Not quite sure what the status of subscription support is at this point. Would I be able to pull the 1.7.0 branch to start implementing subscriptions now? |
@blevine not yet, i'm hoping to merge this into 1.7 today |
Here goes nothin! Feel free to take the 1.7 branch for a spin. |
Let's support GraphQL Subscriptions in Ruby!
Some library changes are required:
commentAdded
is triggered, the root object is theComment
provided by the application.)Query::Result
to simplify re-evaluation feat(Query::Result) add a first-class result object #898My implementation has made an assumption about how root fields map to application events:
Is this sufficient for capturing the "unit of subscription"? Or does it miss some cases?
See the guides in this PR for documentation.
Working demo: https://gist.github.com/rmosolgo/ba31acf93f07f8007d99ba365a662d8f