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.
JoinFor non data layer backed resources, prefer manual reads or generic actions to retrieve?
Modifying the argument clashes with AshCloak changing the argument's type
Platform
with an attribute called credentials
I want to have encrypted. This attribute is a union of embedded resources (representing credentials for different platforms).
I have a change that sets the type
attribute on the credentials union changeset to the same value as the platform.type
is set - to avoid having to pass the same value twice and ensure the credentials type matches the platform type.
After adding the AshCloak encryption, it replaces my argument :credentials, :map
with its own argument typed as a union.This causes my change to fail, because:...How to set user as actor after login?
sign_in_with_password
action provided by AshAuthentication, I would like to set the loaded user as an actor so that it is possible to apply policies and load relationships already at login.Changing attributes in action
expr()
, but i get an InvalidAttributeError
with the hint string_downcase(nil)
```ex
create :create do
accept [:name]...How to write a policy to ensure the user belongs to the tenant through a membership relation?
Anonymous Function Queries (Preparations)
Loading data from an external API for a calculation
Flattening Polymorphic Relationships in Ash GraphQL
bankAccounts
, I get something like this:...Ash Auth For Inertia Setup & Ash Auth vs Ash Phoenix Auth
mix phx.gen.auth
in my Inertia setup and was wondering:
a) Am I losing anything if I don't use Ash Auth yet if I already has my auth configured from the phx.gen.auth since I can just pass the right scope for the actors when using Ash? I am migrating my models to Ash resources now but I need to understand how the ash auth works in tandem with the ash resources as a whole.
b) For the auth vs phoenix auth, I assume phoenix auth is just the UI/liveview + routes scope on top of the ash auth? I can still build my own routes with Inertia rendering and use the auth module to trigger the auth internally right?...ash_authentication_live_session dups
Ash.Scope
, it occurred to me that I'm sort of duplicating assignments with current_user
as it's also set via ash_authentication_live_session
. Is this generally just how folks do things for convenient access in the view or should I be deduplicating somehow? I feel like I shouldn't care but it bothers me on some level lol. Thanks!Cross schema many_to_many
TypedStruct with array and default
{:array, OtherStruct}
field. Passing data to new()
works as expected but after adding default: []
to the field, the field only returns []
. I'm not sure if this is a bug or intended.
Structs:
```...
Ash.Notifier
AshJsonApi: Can a domain support routes for different endpoints/routers?
Usage rules task not found
usage_rules
? I'm getting this all of a sudden: ** (Mix) The task "usage_rules.sync" could not be found
It's in a clean new project. After running ash.setup
, the next thing I always do before starting to work on the project is generating the AGENTS.md
file. Always worked fine until now...Having a small policy that doesn't seem to ever be called
case Map.get(context.actor || %{}, :group_id) do
which i would probably doAsh AI not working
Failed to JSON decode error response. ERROR: %Jason.DecodeError{position: 1005, token: nil, data: "{\n \"error\": {\n \"code\": 400,\n \"message\": \"Invalid JSON payload received. Unknown name \\\"additionalProperties\\\" at 'tools[0].function_declarations[0].parameters
Failed to JSON decode error response. ERROR: %Jason.DecodeError{position: 1005, token: nil, data: "{\n \"error\": {\n \"code\": 400,\n \"message\": \"Invalid JSON payload received. Unknown name \\\"additionalProperties\\\" at 'tools[0].function_declarations[0].parameters
Missing __spark_metadata__ field in Ash.Notifier.PubSub.Publication struct
__spark_metadata__
field. This field is required to access source annotations. Add __spark_metadata__: nil
to the defstruct for Ash.Notifier.PubSub.Publication.
(elixir 1.18.4) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
(spark 2.3.4) lib/spark/dsl/extension.ex:2135: Spark.Dsl.Extension.after_verify/1...no function clause matching in Pgvector.new/1
Ash AI writeable error:
writable? false