subscriptions do pubsub __.Endpoint subscribe :current_user do read_action :self action_types [:update] endend
subscriptions do pubsub __.Endpoint subscribe :current_user do read_action :self action_types [:update] endend
User
User
has one-to-one association with
Preference
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.
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.