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
Reading private attributes stopped working
update
action. Record looks good via Resource.read
, but attribute is nil
. Perhaps due to a recent regression or change in semantics?Ash and AshPhoenix error key needs to be "foreign_resource_id", not "foreign_resource"..
belongs_to :foreign_resource, ForeignResource
, and foreign_resource_id
column.
In phoenix liveview form, after validation I expect error with key "foreign_resource_id" needs to be exist, but only "foreign_resource" error exists.
Can I get error with key "foreign_resource_id"?...Rollback record with Carbonite
force_change_attributes
to try to overcome the problem but it is not woking.
Is there a way to force the changeset to accept all attributes changes without validating them?
Or is there a better way to achieve what I'm trying to achieve?...Ash Admin seems to be flakey
phx-F1UJhmZoL62MpQAj error: view crashed - undefined
...Custom validation error not appearing in form
.input
and .inputs_for
components from Phoenix, and I see the normal is required
errors in the html when I leave fields blank, but while my custom error shows up in the changeset from IO.inspect
I don't see it in the html.
The validation:
```elixir
defmodule Panacea.Sites.Validations.ValidateHostname do
use Ash.Resource.Validation...Handling file uploads in AshGraphql and AshJsonApi
:binary
type in AshGraphql and AshJsonApi? I've been dealing with binary uploads using a more OOB approach, but would be curious to evaluate other options.How to determine the cause of a form validation error
protocol Enumerable not implemented for #Ash.Changeset
code_interface
for a resource, but when I call the function it fails with protocol Enumerable not implemented for #Ash.Changeset<action_type: :create...
at (ash 2.6.27) lib/ash/changeset/changeset.ex:998: Ash.Changeset.cast_params/3
Resource the first...Ash Philosophy
Ash.Resource.Info
module? The "Introspectable" characteristic is usually meaningful when developing library?
2. Does "Derivable" means "the execution of application code written with ash could be easily predicted."?
I am preparing an ash in-house seminar, so I need to understand about this....Where is the right place to perform transformation on form data before database insert?
handle_event
s for creating and updating the resources. Is that a decent approach? Am I overthinking it?...Check if an identity exists in a before_action
before_action
on create right now. The hash of the file is an identity, and I thought eager checking would prevent the upload but it doesn't seem to.
I'd like the create_with_binary
to return the original record if it exists (without uploading) or upload and create a new record if necessary. So basically find_or_create
....