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 can I delete a record by id?
Helpdesk.Api.destroy_support_ticket ticket
Helpdesk.Api.destroy_support_ticket ticket
How can we get a record by id?
Helpdesk.Support.get! Helpdesk.Support.Ticket, ticket.id
Helpdesk.Support.get! Helpdesk.Support.Ticket, ticket.id
Example of setting a has_one relationship
Can a calculation use attributes of a related resource?
belongs_to :brand, App.Portfolio.Brand
and...Authentication actions as graphQL queries/mutations?
sign_in_with_password
action as a graphql query:
```elixir
graphql do...How to use define_interface example in docs it's not clear
define_for
, because it builds on top of the Helpdesk app, I wasn't able to grasp how to use the define_interface
, because the example for it doesn't build on top of the Helpdesk app....Example of :create action with simultaneous assignment of relationship
belongs_to
two other resource types by passing the other resources' .id
values as parameters in the map, to no avail.
Following the Getting Started guide, I understand how I first create the Ticket resource instance and a Representative resource instance and then use the :assign
update action to assign the ticket to the representative.
However, how would I go about creating a ticket with the representative already being assigned during the :create
action? ...Ash stopped working with ExMachina. Ash 2.5.10
Which type for Text?
Ash.Type.String
become with AshPostgres.DataLayer
? 255 characters? What type would I use for longer texts? I found this list but didn't find a text
entry:
```elixir
:map -> Ash.Type.Map
:term -> Ash.Type.Term...Add Index to Attribute
AshProstgres
resource and would like to add an index to the link
parameter. How can I do that?
```elixir
attributes do
uuid_primary_key :id...Create a Unique Attribute
AshPostgres
resource and want to make sure the the title
is unique. How can I do that?
```elixir
attributes do
uuid_primary_key :id..."No changes detected, so no migrations or snapshots have been created."
mix ash_postgres.generate_migrations
fails to pick up any migrations, even after I mix ash_postgres.drop
and rm -f priv/repo/migrations/*
to start from scratch.
Any clues as to why?...Create an Org on public schema and initial User on Org schema
In an action, how can I sort on a field in a relation?
position
field that I wish to sort on first, then the primary id create_ts.
prepare build(load: [:status], sort: [:status.position, :create_ts])
prepare build(load: [:status], sort: [:status.position, :create_ts])
Best Way to Design Resources Properties
module AshPostgres.DataLayer.CustomIndexes is not loaded and could not be found
Remove/Limit FilterInput and SortInput fields from a specific action in GraphQL

Handle pagination on read action with GraphQL
pagination offset?: true, countable: true, default_limit: 2, required?: true
pagination offset?: true, countable: true, default_limit: 2, required?: true

Issues with sorting on `first` aggregate
Limit visibility of fields with AshGraphQL