GraphQL Subscriptions

Are they on the roadmap? Is there an existing pattern for getting them going using Notifiers?
6 Replies
ZachDaniel
ZachDaniel3y ago
Not currently, no. But you should be able to use the types created for your resource actions, for example, and it should be pretty straightforward to hook notifiers up to them. But no current reference implementations exist AFAIK
\ ឵឵឵
\ ឵឵឵OP3y ago
Could it make sense for them to be part of AshGraphql, given they don't follow the typical pattern of actions?
ZachDaniel
ZachDaniel3y ago
Potentially, yes
\ ឵឵឵
\ ឵឵឵OP3y ago
It would make sense to have actions push items to the various channels. The graphql DSL could allow you to define the subscription channels and hook them up to PubSub perhaps. It would be nice to have a way to publish things a bit more explicitly as well, but that would work for the usual "data changed" stuff. Yeah...actually, I would just add a subscriptions block to the graphql DSL and have it build the Absinthe subscription block and an Ash.Notifier for the resource that would publish the specified stuff manually with Absinthe.Subscription.publish.
Alan Heywood
Alan Heywood3y ago
👀 I anticipate needing this sometime in the future
Savary 🏳🌈
Glad I found this thread, was wondering if the DSL included subscription support. Looking forward to this being provided out of the box.

Did you find this page helpful?