pass_parent.ex (319B)
1 defmodule Absinthe.Middleware.PassParent do 2 @moduledoc """ 3 Middleware that just passes the parent down to the children. 4 5 This is the default resolver for subscription fields. 6 """ 7 8 @behaviour Absinthe.Middleware 9 10 def call(%{source: parent} = res, _) do 11 %{res | state: :resolved, value: parent} 12 end 13 end