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.
Join`mix doctor` shows errors for "struct spec" on resource modules
mix doctor
on resource modules, like so...
```
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Doc Cov Spec Cov Module File Functions No Docs No Specs Module Doc Struct Spec
... ...Why store temporary sign in tokens and how to prune them?
store_all_tokens?
indeed stores all tokens, INCLUDING temporary sign in tokens when sign_in_tokens_enabled
is enabled.
First of all, I'm not sure if it's intended behavior. Why do we need to store a tmp token for sign in?
Secondly, I can't find a way to prune it from my DB. I delete the actual token on user sign out, same way as ash_hq does, but I don't have access to that temporary token to delete it -> this leads to handing outdated records in tokens table....Building an aggregates-only Resource
Dashboard
. My first approach was to create a calculation
to calculate a data point. That wasn't going anywhere, so I defined an primary read
action that loaded the data point from inside the prepare
block. That's where I'm at so far. The problem is that calling read()
on the API returns nil
.
Here is an example of the kind of data I want to expose:...Is Ash well suited to Domain Driven Design
Ecto.Multi like transactions
How to write complex query with fragments
Define order of code blocks being added to a migration
attribute match constraints error message
How to bypass ConfirmationHookChange in a specific action
monitor_fields
to be [:email]
.
Now I want to add an action that it "forcefully" change the user e-mail bypassing the whole confirmation process.
Basically the idea is to use that function as an admin-only function....How does AshAuthentication monitor_fields work?
monitor_fields: [:email]
What exactly does that do? Does it "automagically" inserts a change on each action that can change the email
field?...Generic action has `api` nil in context when called from `code_interface`
manage_relationship :remove across API's
Tag
resource that belongs in the Organization
API, I have a Transaction
resource that belongs in the Transactions
API, there is a join resource between them called TransactionTag
that is in the Transaction
API registry.
I am unable to manage_relationship :remove
a Tag
from a Transaction
resource unless I also include the TransactionTag
resource in the Organization
registry. (I get a ResourceNotAllowed error otherwise)
Is this expected behaviour? ...Where do I find documentation on `contains()` , for use within an Ash.Query.filter()?
Ash.Query
functions list on the right side): https://ash-hq.org/docs/module/ash/latest/ash-query#macro-filter-2
...Primary key as string (not UUID)
integer_primary_key()
, and uuid_primary_key()
. If I try leaving either of those out, it returns an error that says I need to specify a primary key. How can this be made to work?How to determine API boundaries?
Any examples of using can?
** (ArgumentError) Invalid action/query/changeset "nil"...
Simulating arguments on relationships with calculations
An aggregate field loaded in create action isn't available for pub_sub?
publish :create, ["update", :aggregate_field1]
in one of my resources fails with the following error, despite the fact that change load(:aggregate_field1)
is in the action definition. If I remove the publish
setting from pub_sub, the create action succeeds, with the :aggregate_field1 properly loaded to the changeset.
I wonder if something changed about how pub_sub works in Ash lately, because my pub_sub and create action codes used to work fine. I did recently update ash to the latest version. Thanks....Policies Usage
Return aggregate after GraphQL mutation