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.
JoinHaving some trouble with a bulk update
Add value to manage_relationship input from current resource
AshGraphQL bulk upsert
create macro, My main concern is argument type generation, if not for that, I could write a custom handler, Is there a better way to handle this?manage_relationship: Get changes in related records
Invoice resource has many Items. Every item calculates its total in a change. I want to calculate the sum of those totals in the invoice but cannot find a way to read the full items, only the input. How can I do this?
```elixir
argument :items, {:array, :map}, allow_nil?: false
change manage_relationship(:items, type: :create)...Reactor persistence and user tasks
Having trouble getting started with Ash

How to model context based multitenancy?
global? true I can log in without knowing the tenant, but I'm not sure what the best strategy to fetch the tenant into after - or during - sign in, given the current_user has no tenant data
- If I use global? false I need the tenant info before sign in, which can be work. I just need to figure it out how to build the magic link with the tenant subdomain - probably a phoenix question though.
Should I define my user resource as?...inline `type()` doesnt work. when defined as calculation on resource it works.
``ex
# this works, where :id_as_string` is the calculation: expr(type(:id, :string))
authorize_if expr(^actor([:service, :id_as_string]) in addressed_groups)...Phoenix 1.18 Ash authentication error
/sign-in or /register on a new application I'm playing with.
``
[error] ** (RuntimeError) Cannot set assign current_user before default AshAuthentication.Phoenix.LiveSession.on_mount/4` has run.
(ash_authentication_phoenix 2.7.0) lib/ash_authentication_phoenix/live_session.ex:163: anonymous fn/5 in AshAuthentication.Phoenix.LiveSession.on_mount/4...manage_relationship to create another resource `belongs_to` relation
manage_relationship will eventually call a create/update action etc., and you are providing inputs for it hereUsing seed and changeset generators with child resources
Child resource that belongs_to a Parent. I'd like to use the seed and changeset generators with these resources in my tests. I'd like to
- generate the Child along with a unique Parent in one generator call
- child = generate(child_seed())
- child = generate(child_changeset())...Bulk update through AshAdmin is skipping 200 records, not sure why
Calculation just ids from a relation
AshPaperTrail
``
[warning] Unhandled error in form submission for AshTableVue.GoldenDataset.Resources.Question.update
This error was unhandled because Ash.Error.Framework.MustBeAtomic does not implement the AshPhoenix.FormData.Error` protocol.
...Reactor and webhook
Stripe.Checkout.Session.create, redirected external session url. Then there's a webhook controller that constructs an event Stripe.Webhook.construct_event.
how would that work using reactor flow? :thinkies: I'm guessing capture payment step should handle the webhook part, but I'm not understanding how would I plug the two? Is this even a valid use case for reactor 😬...AshJsonAPI generic action arguments in a GET route
query_params option IIRC that determines which action inputs are lifted to query params thoughCalculation referencing a resource in a different schema
calculate :geom, :geometry, expr(fragment("ST_UNION(?)", lgas.geog))
calculate :geom, :geometry, expr(fragment("ST_UNION(?)", lgas.geog))
How to manage notifications
notes instead of workspace...Exist the postgres functions array on Ash queries
eq or not_eq
```
anyarray <@ anyarray → boolean
...