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.
JoinHow to get tenant in LiveView after setting it using `PlugHelpers.set_tenant`
conn
|> put_session(:tenant, tenant_id)
conn
|> put_session(:tenant, tenant_id)
install is not the latest version
Translating Ash Error messages
Is it possible to convert policies expression to Ecto expressions?
Wrapping external API - get one object
Stream.resource
and Ash.Query.apply_to
, so it's not clear to me how to proceed....Help with multi-step resource creation in Ash (Phoenix + React)
after_action
was the right choice, you can't set a different tenant with manage_relationship
AFAIK
2. all run in the same transaction, the first action call opens the transaction and all the after action starts the next action in the same transaction
3 . all accessing_from
is checking is a certain value in the context, so you could just manually set the context when calling the other actions inside after_action
...Using Pgvector and Ash.Vector
Pgvector.Ecto.Type
. I've been attempting to slowly move them over to Ash resources using the Ash.Type.Vector
but I've been unable to get both extensions to coexist.
I tried globally defining both: Pgvector.extensions() ++ [AshPostgres.Extensions.Vector] ++ Ecto.Adapters.Postgres.extensions()
, but depending on that list order one or the other breaks.
I also tried matching on type to get around it in a custom extension, which works for encoding:
```...Version 3.5.25 generates wrong SQL
Query across many tenants
multitenancy :bypass
Ash.Actions.Read.AsyncLimiter - Process is not alive or there`s no process .....
Ash.read
, but as soon as I use Ash.page
I get the following error....Is it possible to disable pagination entirely for a read action?
limit
and offset
params in queries/relationship loads, since the bespoke logic of the action kind of already accomplishes what pagination is doing, so it's confusing for the front end devs that consume my API to see those pagination params that are functionally redundant.
I found paginate_with and paginate_relationship_with, which seem to imply that I might be able to pass nil
to disable pagination, but afaict that doesn't seem to do it. Is this something that's supported?...:none
atomIs it possible to "pluck" a sibling using an expr?
type `vector` can not be handled by the types module Postgrex.DefaultTypes
lib/postgrex_types.ex
```elixir
Postgrex.Types.define(...Can I pass an argument to a custom policy check
publisher
, book
, chapter
, user
, permissions
.
My relationships look like the following:
Users
are given permissions
to a publisher. These permissions are an array of arbitrary strings.
...AshOban and Policies
bypass AshObanInteraction do
authorize_if always()
end
bypass AshObanInteraction do
authorize_if always()
end
Short-lived Tokens in Ets-backed Resource
How can I return vector_cosine_distance from search results?
vector_cosine_distance(full_text_vector, ^search_vector)
for debugging purposes. I tried to use a calculation, but I won't have access to search_vector
. In Ecto I'd use a virtual field and use select_merge
. What is the correct approach in Ash here?
```elixir
read :search do
argument :query, :string, allow_nil?: false...How to annotate generic action returning records
__MODULE__
is not recognized so for now I'm using :struct
but I don't think that's completely right.Issue when attempting to encrypt union fields with AshCloak