diff --git a/lib/ash.ex b/lib/ash.ex index fcee894d..7c10e3d4 100644 --- a/lib/ash.ex +++ b/lib/ash.ex @@ -1570,11 +1570,19 @@ defmodule Ash do end end + @type record_or_records :: Ash.Resource.record() | [Ash.Resource.record()] + @doc """ Load fields or relationships on already fetched records. See `load/3` for more information. """ @spec load!( - record_or_records :: Ash.Resource.record() | [Ash.Resource.record()], + record_or_records :: + record_or_records + | {:ok, record_or_records} + | :error + | {:error, term} + | :ok + | Ash.Page.page(), query :: load_statement(), opts :: Keyword.t() ) :: diff --git a/lib/ash/actions/helpers.ex b/lib/ash/actions/helpers.ex index edebd73a..d224c003 100644 --- a/lib/ash/actions/helpers.ex +++ b/lib/ash/actions/helpers.ex @@ -773,7 +773,7 @@ defmodule Ash.Actions.Helpers do if Enumerable.impl_for(results) do Enum.map(results, &select(&1, query)) else - results + results end end