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.
JoinCompletely delete a resource
codegen
? Or is there a different way? Thank youmix ecto.gen.migration
and add the ecto code there to drop the migrationCan not access to actor from token in create action
actor
in the create
action — it’s always nil
. However, I don’t have this issue in the read
action, where I can access the actor without any problems.
```elixir
create :register_with_password do
description "Register a new user with a email and password."...Ash Paper Trail, changes
How can show calculate as fields object in Swaggerui
Success Responses
but inside fields object
it just shows the attributes! and user has to change it by his hand and add the calculate name . if i change this manually in the fields object
text aria it works!
Is there a way to show calculate as fields inside this text aria as default?
or i should change the AshJsonApiRouter
?
Thank you in advance...
Bypass all authorization for specific read action (including loaded relationships
accessing_from
builtin checkJson API for `request_password_reset_token` auth
request_password_reset_token
so that the user can send a password reset request. But the issue I'm facing seems to be that the structure isn't compatible with what the JSON API expects, and as a result, it throws an error.
I wanted to know if there's a way to do this at this stage without changing the action itself?
```elixir
post :request_password_reset_token do
route "/reset_request"...route ...
Update action discrepancy
How to create an atomic validation for the amount on AshMoney?
AshOban - no configuration for `domain`
Bypassing tenancy & authorization to load related data in special read
:bypass_all
IIRCget_and_lock_for_update missing data
get_and_lock_for_update
, then does an anonymous function change. It does this in order to do an array append into an {:array, :map} field.
```elixir...Adding new changeset arguments in `before_action`
Best option to read a relationship which has policy in Action
get_by_subject
I added this:
```elixir
read :get_by_subject do...Aggregate first() generates seemingly inefficient subquery
Show live changes depending on nested data
Invoice
resource that has_many InvoiceItem
s. Every InvoiceItem
gets some data (quantity, tax_rate, unit_price) and calculates the item's total amounts in a change.
```elixir
Invoice Resource
change manage_relationship(:items, type: :create)...transform_params
here. As far as I can understand it's helpful for updating the parameters that get passed to the form, but my "calculated" fields are not actually part of the form.
I was able to figure out another way – maybe it's helpful for someone else, so I'll share it. The solution was quite easy:
1) Run the necessary calculations in the top level changeset (also):...How to implement multi tenancy in user with unique email per site and global
Subscriptions return all data regardless of tenant
Following the guide in AshAi
function: :vector_cosine_distance, arity: nil, resource: Taleed.Poetry.Verse, could_be_calculation?: false, splode: Ash.Error, bread_crumbs: [\"Error returned from: Taleed.Poetry.Verse.vector_search\"], vars: [], path: [:filter], stacktrace: #Splode.Stacktrace<>, class: :invalid}" while retrieving Exception.message/1 for %Ash.Error.Query.NoSuchFunction{function: :vector_cosine_distance, arity: nil, resource: Taleed.Poetry.Verse, could_be_calculation?: false, splode: Ash.Error
function: :vector_cosine_distance, arity: nil, resource: Taleed.Poetry.Verse, could_be_calculation?: false, splode: Ash.Error, bread_crumbs: [\"Error returned from: Taleed.Poetry.Verse.vector_search\"], vars: [], path: [:filter], stacktrace: #Splode.Stacktrace<>, class: :invalid}" while retrieving Exception.message/1 for %Ash.Error.Query.NoSuchFunction{function: :vector_cosine_distance, arity: nil, resource: Taleed.Poetry.Verse, could_be_calculation?: false, splode: Ash.Error
Inconsistent behaviour between Ash.get and read actions, and Ash.load in context multitenancy (pg)
Many to many relationships and join tables in ash admin.
