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

GraphQL Subscriptions #202

Closed
nethsix opened this issue Aug 6, 2016 · 6 comments
Closed

GraphQL Subscriptions #202

nethsix opened this issue Aug 6, 2016 · 6 comments

Comments

@nethsix
Copy link

nethsix commented Aug 6, 2016

@rmosolgo

Love this gem, we have it running in production albeit we are a super small shop. Thanks also for keeping our blog post on the graphql README.

@rmosolgo
Copy link
Owner

rmosolgo commented Aug 6, 2016

Yes, right now support is pretty minimal: we accept a root subscription type and we execute subscription queries against that root. I'm not sure exactly what else the gem needs -- storing subscriptions and delivering payloads is very application-specific right?

I tinkered a while back to get this working on ActionCable:

The basic bits are in place, but there are still a few things to work out! For example:

  • "Automatic" mapping of subscription fields + arguments to ActionCable broadcasts?
  • Don't parse the query every time
  • Better way than send(:transmit, ...) to stream to the client?

@nethsix
Copy link
Author

nethsix commented Aug 6, 2016

Whoa...really nice!! Let me give this a shot. I would need to somehow install ActionCable though since I'm on Rails 4.2, and ActionCable is no longer available as a a separate gem.

Feel free to close this, or I can keep you posted on my attempt to make this work on my Rails app here or even somewhere else, whatever works best for you.

@rmosolgo
Copy link
Owner

rmosolgo commented Aug 6, 2016

One of our apps uses Pusher, I think it would be possible to implement something similar on top of that service instead of ActionCable

@nethsix
Copy link
Author

nethsix commented Aug 6, 2016

Thanks for the tip!

@rmosolgo
Copy link
Owner

I extracted it to a gem here: https://github.com/rmosolgo/graphql-streaming

@nethsix
Copy link
Author

nethsix commented Aug 11, 2016

Thank you as always! Love your work.

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