ash_graphql/lib/resource/notifier.ex

13 lines
284 B
Elixir
Raw Normal View History

2023-12-08 23:59:32 +13:00
defmodule AshGraphql.Resource.Notifier do
use Ash.Notifier
@impl Ash.Notifier
def notify(notification) do
IO.inspect(notification, label: :Notifier)
Absinthe.Subscription.publish(AshGraphql.Test.PubSub, notification.data,
subscrible_created: "*"
)
end
end