anycable / graphql-anycable

A drop-in replacement for GraphQL ActionCable subscriptions. Works with AnyCable.
MIT License
112 stars 18 forks source link

deliver broadcast messages asynchronously #41

Open prog-supdex opened 1 year ago

prog-supdex commented 1 year ago

Deliver messages, which are called by method trigger, asynchronously

It`s a not final PR

prog-supdex commented 1 year ago

@palkan hi!

I sum up the changes

Currently, we have two adapters, "Inline" and "ActiveJob" in two files

The specific adapter is chosen by DeliveryAdapter.lookup and settings in the configuration (delivery_method)

Also, we have a custom serializer AnyCableSubscriptionSerializer which helps do not think about an instance of class AnyCableSubscriptions in active jobs, for example here

But for example here I used the arguments forwarding shorthand, which exists in ruby 2.7 (I see that ci-cd checks on ruby 2.7 and upper), but this gem has a dependency anycable-rails, which requires minimum 2.6 ruby

Maybe here I need not to use the arguments forwarding shorthand