result.ex (381B)
1 defmodule Absinthe.Phase.Subscription.Result do 2 @moduledoc false 3 4 # This runs instead of resolution and the normal result phase after a successful 5 # subscription 6 7 alias Absinthe.Blueprint 8 9 @spec run(any, Keyword.t()) :: {:ok, Blueprint.t()} 10 def run(blueprint, topic: topic) do 11 result = %{"subscribed" => topic} 12 {:ok, put_in(blueprint.result, result)} 13 end 14 end