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.
JoinAsh Record without persitance to the database
Parameterized custom policy checks?
Possible to skip validation for an action? (or best practices for working with external credentials)
Vendor
for interacting with external vendors, so we store user credentials for those vendors encrypted in the resource. I've now added a validation when creating vendors, that validates that the credentials are actually valid (by talking to the external API). This works great!
However, I have a test suite that generates lots of Vendor resources in the course of testing things, and 99% of them don't use valid credentials (nor should they!) so now all the tests are failing due to this new validation.
I can see a couple of options:...No Absinthe schemas generated for resource
How to have a "virtual field" in a resource based from another resource?
Organization
resource that has a many to many relationship with my User
resource.
That relationship is defined by this field in the Organization
resource:
```elixir...Keyset pagination with calculations
Custom / virtual fields on read
builk_create upsert seems to be broken
Can I expose a generic resource action via an Ash GraphQL mutation?
What happens when :prev page request is used but there is no previous page?
Expand Ash.Query.Operator built_in operators
is_nil
, eq
, in
, less_than
, etc).
These are great, but it is not enough in some cases. For example, let's say I want to create a similarity
operator?
The obvious answer is that I can implement it myself using the Ash.Query.Operator.__using__/1
macro....Custom type don't show all possible filters in GraphQL Api
Can't destroy record, would leave records behind
Bulk create form
Metaprogramming with expressions
Ash.Query.filter
doesn't work as intended. Please see comment below
```elixir
defp generate_oban_worker_module(module, cache) docontents =...
Ash.Error as application's exception/error module
In a previous project (which did not use Ash) we had a top-level Error module that had a
defexception
in it with all the typical error things, like codes, messages, and metadata. It also had some other functions to do things like, for example, report the error to various sinks (Logger and an APM platform). The idea was to replace returns like {:error, :some_error_code}
or {:error, "some message"}
with {:error, MyApp.Error.exception(...)}
and let code that receives such errors decide it it wants to report, re-raise, etc etc.
With the existence of Ash.Error
and all the helper code around it, I wonder if it makes sense to build an application's top-level error off of Ash.Error
instead of something custom? Even if those errors might not have anything to do with Ash?
Is it the intention of Ash.Error
to be used purely for errors coming from the framework, or is it a building block for user-defined errors?...implementing state_timeout in AshStateMachine
Deleting resources that have existing relationships
* ash 2.9.11 4baa454f
* ash_postgres 1.3.28 aa32bf2b
* ash 2.9.11 4baa454f
* ash_postgres 1.3.28 aa32bf2b
Aggregates with resource relationships
Few Ash.Flow questions
expr(Money.positive(^arg(:amount)))
, I've tried and get a Spark DSL error.
2) Is there a neater way to get_by
a resource (similar to how we do it for code_interface) than having to define a separate action? - or does this go against the ethos of Ash.Flow
, currently it seems slightly disjointed, with one part of the API encouraging one way and providing nice helpers, but another part not being really integrated, I'm assuming this is just me wanting to use it wrong and carry over certain bad habits / not knowing the magic helpers that do exist...
3) Are there plans to have a flow be able to be invoked via a code_interface?...