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.
JoinAshGraphql: Updating a managed has_many relationship
"In field \"id\": Unknown field."
in the GraphQL response error. It's referring to the id
provided in the has_many related record .
```elixir
This is the updateWebSite input argument. It's a UpdateWebSiteInput type.
input = %{...AshGraphql Manage Relationships with multiple actions
managed_relationships
DSL to allow a GraphQL mutation to update relationship data on a resource. I works fine with the :create
action, but on adding the similar code for the :update
action, it gives errors. Here are the relevant parts of the resource module:
```elixir
defmodule GF.WebSite do...Adding custom routes with AshJsonApi
Getting the user's IP address in an action
Multitenancy and no_attributes? relationship option
no_attributes?
option while declaring relationships.
Specifically, if you have a tenant resource like Organization , you can use no_attributes? to do things like has_many :employees, Employee, no_attributes?: true , which lets you avoid having an unnecessary organization_id field on Employee
Specifically, if you have a tenant resource like Organization , you can use no_attributes? to do things like has_many :employees, Employee, no_attributes?: true , which lets you avoid having an unnecessary organization_id field on Employee
AshPhoenix Form use for `many_to_many` relationships through `append_and_remove` management
{:array, :uuid}
, for example in the context of managing a many_to_many
relationships through append_and_remove
, in extension of your example here https://hexdocs.pm/ash/2.6.18/managing-relationships.html.
For example, I have this resources with the desired result of allowing the user to select a list of tags from a multiple select:...Pagination required by default in ash_graphql?
Calculate aggregations?
sum_1 = sum_some_data(user_1, :column_1)
, sum_2 = sum_some_data(user_1, :column_2)
then sum_1 - sum_2
and return this value.Postgres Table(s)
** (KeyError) key :options not found: Error on AshPhoenix.Form submit
Using AshGraphql to fetch a single item without providing arguments
WebSite
, and the tenant would normally have only one of these. I am trying to create a GraphQL query called getWebSite
that returns the tenant's WebSite
, but the query response has the error, "In argument "id": Expected type "ID!", found null."
I don't want the query to take any arguments.
Here is the test that reproduces there error:
```elixir...function WequalWeb.AshAdmin.PageLive.__live__/0 is undefined
How to manage relationships with AshGraphql
WebSite
that has_many :components
, and each is a WebComponent
. This test failed:
```elixir
test "success creating a WebSite", ctx do
input = %{...key :current_user not found error in ash_authentication_phoenix tutorial sample home.html.heex
Set tenant within read action in resource dsl?
set_tenant/1
in there but it doesn't seem to work......I'm trying to understand how to use attribute-based multitenancy with AshGraphql
multitenancy
block in your resource module, and add a strategy
and attribute
. Check:
```elixir
multitenancy do
strategy :attribute
attribute :org_id...AshGraphql :create mutation returns empty result
result
object.
Details to follow......How to replace Ecto.Schema modifications?
How to solve "(Jason.DecodeError)" in Ash Authentication Phoenix tutorial
`AshJsonApi` composite primary key
AshJsonApi
to a project currently using AshGraphql
, getting complaints about my many_to_many
resources:
json_api -> primary_key:
AshJsonApi requires primary key when a resource has a composite key
json_api -> primary_key:
AshJsonApi requires primary key when a resource has a composite key