AshDispatch.Calculations.LoadUser (AshDispatch v0.5.0)
View SourceCalculation for loading user records from the configured user resource.
This provides a clean way to load users without compile-time dependencies. The consuming application configures which user resource to use:
config :ash_dispatch,
user_resource: MyApp.Accounts.User,
user_domain: MyApp.AccountsUsage
In queries:
DeliveryReceipt
|> Ash.Query.load(:user)
|> Ash.read!()The calculation will batch-load all users efficiently.
Summary
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.init/1.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.
Functions
Callback implementation for Ash.Resource.Calculation.describe/1.
Callback implementation for Ash.Resource.Calculation.has_expression?/0.
Callback implementation for Ash.Resource.Calculation.init/1.
Callback implementation for Ash.Resource.Calculation.strict_loads?/0.