Absinthe.Phoenix.Socket.put_options

You're seeing just the function put_options, go back to Absinthe.Phoenix.Socket module for more information.
Link to this function

put_options(socket, opts)

View Source

Specs

Configure Absinthe options for a socket.

Examples

def connect(params, socket) do
  current_user = current_user(params)
  socket = Absinthe.Phoenix.Socket.put_options(socket, context: %{
    current_user: current_user
  })
  {:ok, socket}
end

defp current_user(%{"user_id" => id}) do
  MyApp.Repo.get(User, id)
end