Skip to content

Commit

Permalink
https://github.com/bonfire-networks/bonfire-app/issues/916
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Apr 26, 2024
1 parent fb51898 commit aad0ad9
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions lib/action.ex
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ defmodule AbsintheClient.Action do
pipeline(schema, querying_module, config)
) do
{:ok, %{result: result}, _phases} ->
conn_or_socket
|> Helpers.assign(:absinthe_variables, params)
|> return_or_put(result)
# conn_or_socket
# |> Helpers.assign(:absinthe_variables, params)
# |> return_or_put(result)
result

{:error, msg, _phases} ->
# IO.inspect(error: msg)
Expand All @@ -137,18 +138,18 @@ defmodule AbsintheClient.Action do
end
end

def return_or_put(%Phoenix.LiveView.Socket{} = socket, val) do
val
end
# def return_or_put(%Phoenix.LiveView.Socket{} = socket, val) do
# val
# end

def return_or_put(%Plug.Conn{} = conn, val) do
conn
|> Map.put(:params, val)
end
# def return_or_put(%Plug.Conn{} = conn, val) do
# conn
# |> Map.put(:params, val)
# end

def return_or_put(_other, val) do
val
end
# def return_or_put(_other, val) do
# val
# end

defp document_key(%{assigns: assigns}), do: document_key(assigns)
defp document_key(%{private: assigns}), do: document_key(assigns)
Expand Down

0 comments on commit aad0ad9

Please sign in to comment.