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.
JoinHandling an %Ash.Error.Invalid{} in LiveView
{:error, %Ash.Error.Invalid{} }
How do I get those errors onto the form?
```...AshAuthenticationPhoenix Override Register Form
register_extra
slot which receives the form, so I was thinking I could use that.
Is there a way to override just the Password.RegisterForm to a custom component (assuming that is how I'd add the slot)?...Ash Query filter function
Does attribute `default: _` not set the struct's default value?
default:
value, it doesn't set the default on the generated struct definition. I would expect it would, like Ecto.Schema
does. Is there a reason it doesn't? Or is there a way of accomplishing this that I couldn't find in the documentation?
```elixir
defmodule GF.Ash.WebComponent do
use Ash.Resource,...Issue using datetime_add
Using Ash Resources as input types
manage_relationship
figure it out, or to take as a parameter only the :uuid
and similarly construct a map with just %{id: uuid}
for manage_relationship
.
The culprit in some cases seems to be AshGraphql, which errors following this pattern:
```
== Compilation error in file lib/app/schema.ex ==...Use Ash policies with simple functions
FunWithFlags
package for feature flags. I have a live view to handle the flags, and also a context module for it. Now I wan't to create some authorization code to this context module, and since I'm already using Ash for the rest of the system, I was wondering if there is a way to configure policies for a specific function....Re-sort items in a form without submitting the form
phx-click
event, but I'm not sure what's the best way to display the items reordered based on the new priority values, without submitting the form. I'm guessing it should be done in the 'validate' handle_event, which currently only includes this.
form = AshPhoenix.Form.validate(socket.assigns.form, form_params)
form = AshPhoenix.Form.validate(socket.assigns.form, form_params)
cross_join on a Ash.Query
Destroying related resources
manage_relationship
to create and update them. For destroying, is it pretty much the same process, where the form has all the nested subforms and then I take those in through arguments and manage_relationship them and destroy them? I haven't seen anything explicitly on this topic in the documentation or here, pardon me if I've missed it. I want to make sure I don't leave any orphaned resources, which the loaded form on my edit pag...Not seeing policy authorization errors
``
[warning] Unhandled error in form submission for Panacea.Accounts.User.add_user
This error was unhandled because it did not implement the
AshPhoenix.FormData.Error` protocol....Policy engine duplicates/optimizations
Guides or advice for migrating to Ash?
mix ash_postgres.generate_migrations
for the first time, the generated migrations are to create tables that already exist and the table structures are different. Are there any guides or do you have any advice for reconciling the differences?
Original ecto migration:...Change storage_type of Ash.Type.Term to :binary?
Integrating Google Login via Ash Aunthentication
How to filter associations when preloading them?
Ecto.Query
instead, but I was wondering how I would do it with Ash.Query
The scenario, I want to list out all of the Post
and I also want to preload the Category
association of each post. I also want to filter the categories to only ones that contain a specific category_id
....Casting Binary from Ash.Type.Binary to GraphQL type
:binary
in my resource user which just represents a token generate using :crypto
but I get this error
Could not determine graphql field type for Ash.Type.Binary
any ideas on how to solve this?...How do I use relationship_display_fields
relationship_display_fields
? I couldn't figure it out from the docs or the tweet.
Alternatively, is there a way to link the referencing id to the object in the admin panel? eg. if you have a user_id
, clicking the user_id
takes you to the page for that user...Proxying actions to other actions