Ash FrameworkAF
Ash Framework5mo ago
5 replies
Rick

graphql subscription triggered by association

I have this subscription on the user resource

subscriptions do
  pubsub __.Endpoint

  subscribe :current_user do
    read_action :self

    action_types [:update]
  end
end


User
has one-to-one association with Preference resource, I would like to publish to that subscription when I update the associated too, can I do that via DSL or creating a change on the targets actions in that resource?
Solution
At the moment I think the only way would be to have a change that updates the user resource as well to trigger the subscription or have 2 separate subscriptions on the client.
Was this page helpful?