Ash Framework
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
JoinAsh Framework
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.
JoinAccept subset of Ash.Type.Enum in action
Ash.Type.Enum
defined as
```elixir
defmodule Dreng.Accounts.Role do
use Ash.Type.Enum, values: [:superadmin, :admin, :farmer, :farmhand]
end...Update Params in Nested Form with Union type
Ash.Error.Unknown.UnknownError: Invalid reference
UserUpload
resource. I added another criteria for filtering the resource by the first or last name of its user
relationship. However, the String.contains?
lines give this error:
11:29:38.679 request_id=GFIrFgeBN9WstPIAASCB remote_ip=127.0.0.1 [error] ** (MatchError) no match of right hand side value: {:error, %Ash.Error.Unknown{errors: [%Ash.Error.Unknown.UnknownError{error: "Invalid reference user.first_name at relationship_path [:user]", field: nil, value: nil, splode: Ash.Error, bread_crumbs: [], vars: [], path: [:filter], stacktrace: #Splode.Stacktrace<>, class: :unknown}]}}
11:29:38.679 request_id=GFIrFgeBN9WstPIAASCB remote_ip=127.0.0.1 [error] ** (MatchError) no match of right hand side value: {:error, %Ash.Error.Unknown{errors: [%Ash.Error.Unknown.UnknownError{error: "Invalid reference user.first_name at relationship_path [:user]", field: nil, value: nil, splode: Ash.Error, bread_crumbs: [], vars: [], path: [:filter], stacktrace: #Splode.Stacktrace<>, class: :unknown}]}}
first_name
and last_name
fields are public?: true
...
Advise on using policies with related resources
Transfer
and Account
. Transfer updates the accounts balance it's related to.
Now I have admin which can create/update/read both resources.
I have an operator that can only create transfers.
The issue is updating the account balance when the operator creates the transfer. Since he does not have access to create/update an acccount....AshCommanded - I'm running in to an issue with ash_commanded not working with spark v3?
How to set the actor within an action
user
as an argument:
```
create :upsert_meeting_prep_action do...Subscriptions do not work when declared in the domain.
Plug.CSRFProtection.InvalidCSRFTokenError
Rollback went further than expected
mix ash.rollback -r Ngen.Repo
and answered the prompt but it rolled much further back than I expected.
```bash
How many migrations should be rolled back? (default: 0)
...Persisting values from relationships at creation time
product
s to be purchased by users. Since prices might change over time, I'd like to put the price of the product at the time of purchase into the order
resource record.
Given a product with the following attributes...Does `AshPostgres` support partitions? i.e. Schema-based multitenancy
How to add authorization to filter nested data
Multiple Tenant Resources
Organization
and Establishment
. I'm using the new scope
feature and the value for current_tenant
is a map containing both tenants. I need to provide an Ash.ToTenant
implementation that extracts the correct tenant depending on the resource being queried.
I've tried this:
```elixir...Ash.Reactor - Transform results for `initial` or `argument`
create
or bulk_create
step? Or is it better to have a separate transform step and use its result as the initial for create
or bulk_create
step?
API Call step -> Transform Results to Resource attrs -> Create or Bulk Create step...Is it possible to list and select the relationship in the Admin resource creation form?

ash notifier pubsub question
JSON API raw response
:zlib.gzip()
. But Ash JSON API tries to encode it with Jason and raises an error.
How do I tell it to return the raw response as is?...AshPhoenixForm not executing action on submit
Understanding indexes
:id
attribute always indexed?
2. If one would like to make a partial index like [:user_id, :is_active]
we should use custom_indexes
inside the postgres
definition, right? - would this then also be usable by queries that only filter on :user_id
(but not filtering on the :is_active
)?...invalid_field: InvalidField | Invalid field for type user: name
