Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore subscription publish with empty subscribed_fields
As written, `Absinthe.Subscribe.publish()` will still broadcast via pubsub every single mutation results, even if the subscribed fields is empty. This is because get_subscription_info() will return an empty array if it does now find any subscribed fields. This is passed down all the way to the pubsub. Absinthe.Subscription.Local ultimately ignores this when attempting to iterate over an empty list. This can result in significant network traffic among nodes that ultimately does nothing. When deployed on the cloud in a multi-az deployment, this can result in significant increase in network traffic charges. This patch adds a clause where empty subscribed_fields is ignored.
- Loading branch information