ash_graphql/lib/resource/subscription/config_function.ex

14 lines
324 B
Elixir
Raw Normal View History

2024-01-05 00:53:59 +13:00
defmodule AshGraphql.Resource.Subscription.ConfigFunction do
use AshGraphql.Resource.Subscription.Config
@impl true
def config(changeset, [fun: {m, f, a}], context) do
apply(m, f, [changeset, context | a])
end
@impl true
def config(changeset, [fun: fun], context) do
fun.(changeset, context)
end
end