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.
JoinKey :editing_tenant not found
Prefixed base62 UUIDv7 primary key implementation with Ash
0188aadc-f449-7818-8862-5eff12733f64 will be shown as acct_02tRrww6GFm4urcMhyQpAS), like what is described here for Ecto (https://danschultzer.com/posts/prefixed-base62-uuidv7-object-ids-with-ecto).
I'll be happy to contribute with the result of this as a code sample or better as an elixir package as soon as I get it all working properly.
...What is the __metadata__ field in new versions of Ash?
__metadata__ field will be a empty map %{}, but when I fetch the same resource with a read action, it will contain a key called selected in that map with the list of fields that were selected....Need a feature for customizing error message.
Differences between UUID primary keys in Ecto vs Ash
uuid_primary_key unwraps into:
```elixir
attribute :id, :uuid do
writeable? false
default &Ash.UUID.generate/0...Starting a Phoenix/Ash project with minimal cruft
Check a policy manually
How to insert a record with its nested children?
Ash dropping FilterCheck if there's `authorize_if always()`
authorize_if MyApp.FilterByActorId
authorize_if always()
authorize_if MyApp.FilterByActorId
authorize_if always()
How do relationships with composite keys work?
Policy checks on related resources
Using manage_relationship to delete a related record
type: :remove option, Ash responds with Invalid value provided for notes: changes would create a new related record. Is this the right approach? Or should I manually delete the record?Confused about `one_of` vs `attribute_equals`
:verify action on a resource, which I only want to run on resources which have :role set to :unverified The below works as expected (produces valid/invalid changesets as expected):
```
update :verify do #custom action to verify an unverified user
validate attribute_equals(:role, :unverified) #only verify unverified users
change set_attribute(:role, :verified)...Calculatated fields and AshGraphQL
Bypass not applying - had to pass actor again in load
load! call.
not sure if there's a better way to do this type of thing but this is what's working now:...AshJsonApi + Managed Relationships
Can You Add Additional Attributes to ash_authentication_phoenix?
role attribute to my user resource so I did the below:
```
attributes do
uuid_primary_key :id
attribute :email, :ci_string, allow_nil?: false...How to determine if the current page is the last or first page in Keyset pagination
Full debug SQL
AshPostgres.DataLayer.run_aggregate_query/3, at: lib/data_layer.ex:738
A long enough sql would be truncated. How do I get the full sql without truncation?
Thanks!...Setting defaults for a form input that is an argument and not an attribute?
default option for an action argument; however, It accepts a zero-argument function, so there's no way to get the resource being updated.
I explored using the prepare_params option for AshPhoenix.Form.for_update but I couldn't find any examples. It's arrity 2 and receives the params but is only called when the form is validated or submitted....