# \#ash-graphql

**URL:** https://forum.elixirforum.com/tag/ash-graphql/3906.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Empty Result on Generic Action with graphql\_unnested\_unions](https://forum.elixirforum.com/t/empty-result-on-generic-action-with-graphql-unnested-unions/75769)

<div class="topic-metadata">

**Author:** [@thawke](https://forum.elixirforum.com/u/thawke)\
**Replies:** 2\
**Last updated:** [July 21, 2026, 5:19pm UTC](https://forum.elixirforum.com/t/empty-result-on-generic-action-with-graphql-unnested-unions/75769 "2026-07-21T17:19:46Z")

</div>

I have a generic action on a resource that returns a union type. If I mark types with graphql\_unnested\_unions then the type’s fields disappear in the response. This happens for both embedded resources and typed structs. …

---

## [How to add realtime updates with AshTypescript channels?](https://forum.elixirforum.com/t/how-to-add-realtime-updates-with-ashtypescript-channels/73955)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 1\
**Last updated:** [January 13, 2026, 4:05pm UTC](https://forum.elixirforum.com/t/how-to-add-realtime-updates-with-ashtypescript-channels/73955 "2026-01-13T16:05:17Z")

</div>

I’m currently evaluating for a new project if we will use AshTypescript for our backend/frontend (frontend probably in next.JS) communication instead of AshGraphQL. For normal HTTP requests, so far it seems like a super…

---

## [set\_attribute(:line, arg(:line)) sets to nil when argument is not provided](https://forum.elixirforum.com/t/set-attribute-line-arg-line-sets-to-nil-when-argument-is-not-provided/73884)

<div class="topic-metadata">

**Author:** [@Andrew-Bekhiet](https://forum.elixirforum.com/u/Andrew-Bekhiet)\
**Replies:** 2\
**Last updated:** [January 6, 2026, 12:39am UTC](https://forum.elixirforum.com/t/set-attribute-line-arg-line-sets-to-nil-when-argument-is-not-provided/73884 "2026-01-06T00:39:49Z")

</div>

When using change set\_attribute(:line, arg(:line)) and using input: {} in the graphql api, the line attribute is set to nil and persisted as null in the database, which erases existing field data I expected that it woul…

---

## [Setting my endpoint in AshGraphql subscriptions makes resource recompile for any LV change](https://forum.elixirforum.com/t/setting-my-endpoint-in-ashgraphql-subscriptions-makes-resource-recompile-for-any-lv-change/73263)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 2\
**Last updated:** [November 11, 2025, 1:23pm UTC](https://forum.elixirforum.com/t/setting-my-endpoint-in-ashgraphql-subscriptions-makes-resource-recompile-for-any-lv-change/73263 "2025-11-11T13:23:22Z")

</div>

I’ve been investigating why some code keeps recompiling in my project when I do small changes to LV files this past week. One thing that I noticed is that my user resource (which is pretty big and will take a lot of tim…

---

## [Like Filter Missing in ci\_string ash\_graphql Filter](https://forum.elixirforum.com/t/like-filter-missing-in-ci-string-ash-graphql-filter/72912)

<div class="topic-metadata">

**Author:** [@thawke](https://forum.elixirforum.com/u/thawke)\
**Replies:** 0\
**Last updated:** [October 14, 2025, 5:12pm UTC](https://forum.elixirforum.com/t/like-filter-missing-in-ci-string-ash-graphql-filter/72912 "2025-10-14T17:12:09Z")

</div>

I may be doing something wrong, but the generated filter for :ci\_string fields in ash\_graphql doesn’t seem to include the like operator like :string fields do. It doesn’t include ilike which makes sense as it is case ins…

---

## [What warning "does not have an input type defined" means for embedded resources?](https://forum.elixirforum.com/t/what-warning-does-not-have-an-input-type-defined-means-for-embedded-resources/72838)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 4\
**Last updated:** [October 13, 2025, 2:48pm UTC](https://forum.elixirforum.com/t/what-warning-does-not-have-an-input-type-defined-means-for-embedded-resources/72838 "2025-10-13T14:48:40Z")

</div>

I have this resource in my code: defmodule Core.Marketplace.Payments.Product.Types.Test do @moduledoc false use Ash.Resource, data\_layer: :embedded, extensions: \[AshGraphql.Resource\] attributes do ti…

---

## [AshGraphQL embedded resources without attributes](https://forum.elixirforum.com/t/ashgraphql-embedded-resources-without-attributes/72828)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 3\
**Last updated:** [October 9, 2025, 2:10pm UTC](https://forum.elixirforum.com/t/ashgraphql-embedded-resources-without-attributes/72828 "2025-10-09T14:10:48Z")

</div>

I have a field in a resource that can be an union of two embedded resources. One of these resources have no attributes: defmodule Core.Marketplace.Payments.Product.Types.Metadata do @moduledoc false alias Core.Mark…

---

## [AshGraphql Subscription - Why does the data do not show up on subscribe?](https://forum.elixirforum.com/t/ashgraphql-subscription-why-does-the-data-do-not-show-up-on-subscribe/71199)

<div class="topic-metadata">

**Author:** [@bastiW](https://forum.elixirforum.com/u/bastiW)\
**Replies:** 5\
**Last updated:** [July 5, 2025, 7:29pm UTC](https://forum.elixirforum.com/t/ashgraphql-subscription-why-does-the-data-do-not-show-up-on-subscribe/71199 "2025-07-05T19:29:30Z")

</div>

Hi, I created an Ash application with the following: AshGraphql Subscription AshSqlite The issue is that the data does not show up in the graphiql interface. The issue can be reproduced with the reproduction reposito…

---

## [How to disable the filters input on list AshGraphql list queries?](https://forum.elixirforum.com/t/how-to-disable-the-filters-input-on-list-ashgraphql-list-queries/70486)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 1\
**Last updated:** [April 15, 2025, 3:43pm UTC](https://forum.elixirforum.com/t/how-to-disable-the-filters-input-on-list-ashgraphql-list-queries/70486 "2025-04-15T15:43:56Z")

</div>

In some cases, I want to add a read action as an GraphQL API but I don’t want to allow the user to filter it in any way, in other words, I want to api to be generated without the filters input. I couldn’t find a way to …

---

## [Handle dynamic calculations and aggregates in AshGraphql](https://forum.elixirforum.com/t/handle-dynamic-calculations-and-aggregates-in-ashgraphql/70368)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 5\
**Last updated:** [April 11, 2025, 5:39pm UTC](https://forum.elixirforum.com/t/handle-dynamic-calculations-and-aggregates-in-ashgraphql/70368 "2025-04-11T17:39:49Z")

</div>

I have in my resources some actions that need to do some specific calculations and aggregates, since they are very specific for the action itself (they will never be used by other actions), I don’t want to add them to my…

---

## [AshGraphql response data is null, only when a particular policy is used](https://forum.elixirforum.com/t/ashgraphql-response-data-is-null-only-when-a-particular-policy-is-used/70420)

<div class="topic-metadata">

**Author:** [@moxley](https://forum.elixirforum.com/u/moxley)\
**Replies:** 9\
**Last updated:** [April 11, 2025, 2:13pm UTC](https://forum.elixirforum.com/t/ashgraphql-response-data-is-null-only-when-a-particular-policy-is-used/70420 "2025-04-11T14:13:55Z")

</div>

I’m running into a policy and AshGraphql problem, and it seems like a bug. Here’s my GraphQL query: query GetEvent2($id: ID!) { getEvent2(id: $id) { id } } It’s returning the following response: %{"data" =\> %…

---

## [Controlling a JSON field in a AshGraphql query](https://forum.elixirforum.com/t/controlling-a-json-field-in-a-ashgraphql-query/70407)

<div class="topic-metadata">

**Author:** [@moxley](https://forum.elixirforum.com/u/moxley)\
**Replies:** 6\
**Last updated:** [April 10, 2025, 7:41pm UTC](https://forum.elixirforum.com/t/controlling-a-json-field-in-a-ashgraphql-query/70407 "2025-04-10T19:41:33Z")

</div>

In my resource, there is an attribute called component, backed by a JSONB column. I’d like to expose that attribute as a JSON field in AshGraphql, but I want to modify it first (converting keys from underscore\_case keys …

---

## [Enabling form validation via AshGraphql](https://forum.elixirforum.com/t/enabling-form-validation-via-ashgraphql/70025)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 13\
**Last updated:** [March 27, 2025, 11:59pm UTC](https://forum.elixirforum.com/t/enabling-form-validation-via-ashgraphql/70025 "2025-03-27T23:59:25Z")

</div>

First, a disclaimer, I didn’t think too much about this idea so maybe there is already a better solution or even if this is possible giving GraphQL constraints. The idea is to “replicate” the validate functionality of L…

---

## [Passing GraphQL variables to a generic action's arguments](https://forum.elixirforum.com/t/passing-graphql-variables-to-a-generic-actions-arguments/69780)

<div class="topic-metadata">

**Author:** [@moxley](https://forum.elixirforum.com/u/moxley)\
**Replies:** 11\
**Last updated:** [March 5, 2025, 10:48pm UTC](https://forum.elixirforum.com/t/passing-graphql-variables-to-a-generic-actions-arguments/69780 "2025-03-05T22:48:01Z")

</div>

I defined a generic mutation action that takes an :id argument and an :input argument with an embedded resource backing :input. When I test the AshGraphql mutation, it doesn’t know about the arguments. It appears that As…

---

## [Using Ash.Query.add\_error()](https://forum.elixirforum.com/t/using-ash-query-add-error/67948)

<div class="topic-metadata">

**Author:** [@moxley](https://forum.elixirforum.com/u/moxley)\
**Replies:** 7\
**Last updated:** [December 8, 2024, 6:53am UTC](https://forum.elixirforum.com/t/using-ash-query-add-error/67948 "2024-12-08T06:53:16Z")

</div>

I’m creating a read AshGraphql query, and I want it to return an error for certain conditions. When I call Ash.Query.add\_error(query, "some error message") or similar in the action prepare, the GraphQL query returns: %{…

---

## [How to apply filtering on a relationship based on the read action of the parent](https://forum.elixirforum.com/t/how-to-apply-filtering-on-a-relationship-based-on-the-read-action-of-the-parent/67865)

<div class="topic-metadata">

**Author:** [@moxley](https://forum.elixirforum.com/u/moxley)\
**Replies:** 6\
**Last updated:** [December 4, 2024, 2:59pm UTC](https://forum.elixirforum.com/t/how-to-apply-filtering-on-a-relationship-based-on-the-read-action-of-the-parent/67865 "2024-12-04T14:59:14Z")

</div>

How do I apply a specific filtering on a related resource that’s two layers down from the parent resource, where the filter is determined from the parent’s read action being called? Here’s the AshGraphql query: query G…

---

## [Including updatedAt in the AshGraphql schema](https://forum.elixirforum.com/t/including-updatedat-in-the-ashgraphql-schema/67303)

<div class="topic-metadata">

**Author:** [@jason.o](https://forum.elixirforum.com/u/jason.o)\
**Replies:** 1\
**Last updated:** [November 7, 2024, 1:37am UTC](https://forum.elixirforum.com/t/including-updatedat-in-the-ashgraphql-schema/67303 "2024-11-07T01:37:22Z")

</div>

AshGraphql schema doesn’t seem to include inserted\_at and updated\_at fields of the underlying table. Is there a way to add them to the schema?

---

## [How to change an action argument name with AshGraphql?](https://forum.elixirforum.com/t/how-to-change-an-action-argument-name-with-ashgraphql/66837)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 5\
**Last updated:** [October 21, 2024, 2:54pm UTC](https://forum.elixirforum.com/t/how-to-change-an-action-argument-name-with-ashgraphql/66837 "2024-10-21T14:54:28Z")

</div>

If I have an attribute in my resource that has a character that graphql doesn’t support (ex. :invalid?), then I can easily fix that by using the field\_names invalid?: :is\_invalid function. Now, let’s say I have an argum…

---

## [Sign in with AshGraphql in Ash3](https://forum.elixirforum.com/t/sign-in-with-ashgraphql-in-ash3/66032)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 4\
**Last updated:** [October 17, 2024, 9:05pm UTC](https://forum.elixirforum.com/t/sign-in-with-ashgraphql-in-ash3/66032 "2024-10-17T21:05:32Z")

</div>

I’m upgrading my project from Ash 2 to Ash 3. One thing that I saw is that the token policies should be like this: policies do bypass AshAuthentication.Checks.AshAuthenticationInteraction do authorize\_if al…

---

## [Reading calculations in Ash GraphQL](https://forum.elixirforum.com/t/reading-calculations-in-ash-graphql/66487)

<div class="topic-metadata">

**Author:** [@mrdougwright](https://forum.elixirforum.com/u/mrdougwright)\
**Replies:** 3\
**Last updated:** [October 3, 2024, 2:17pm UTC](https://forum.elixirforum.com/t/reading-calculations-in-ash-graphql/66487 "2024-10-03T14:17:48Z")

</div>

I have an Ash GraphQL schema, with calculations, simplified like so: attributes do attribute :start\_at, :utc\_datetime, public?: true end calculations do calculate :end\_at, :utc\_datetime, …

---

## [Change not called with update action is called from ash\_graphql](https://forum.elixirforum.com/t/change-not-called-with-update-action-is-called-from-ash-graphql/66195)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 4\
**Last updated:** [September 20, 2024, 12:11pm UTC](https://forum.elixirforum.com/t/change-not-called-with-update-action-is-called-from-ash-graphql/66195 "2024-09-20T12:11:30Z")

</div>

I have a change that is configured in the changes block like this: changes do change {Core.Ash.Changes.Audit, meta: %{actor: actor(:id)}}, on: \[:create, :update, :destroy\] end Here is that change implemen…

---

## [Ash Resource Change behavior differs between REPL and GraphQL mutation](https://forum.elixirforum.com/t/ash-resource-change-behavior-differs-between-repl-and-graphql-mutation/65980)

<div class="topic-metadata">

**Author:** [@florid-sojourner](https://forum.elixirforum.com/u/florid-sojourner)\
**Replies:** 5\
**Last updated:** [September 17, 2024, 5:04pm UTC](https://forum.elixirforum.com/t/ash-resource-change-behavior-differs-between-repl-and-graphql-mutation/65980 "2024-09-17T17:04:47Z")

</div>

I get different behavior when using the REPL to do a resource update that includes and after\_action when I issue the same change via a GraphQL mutation. On my resource: update :complete do ... redacted ... …

---

## [AshGraphql filter for atom attribute stopped working in Ash 3](https://forum.elixirforum.com/t/ashgraphql-filter-for-atom-attribute-stopped-working-in-ash-3/66058)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 17\
**Last updated:** [September 16, 2024, 6:25pm UTC](https://forum.elixirforum.com/t/ashgraphql-filter-for-atom-attribute-stopped-working-in-ash-3/66058 "2024-09-16T18:25:40Z")

</div>

I have this attribute in my resource: attribute :status, :atom do allow\_nil? false public? true constraints one\_of: \[:draft, :open, :pending, :sold, :inactive\] default :draft end And I…

---

## [AshGraphql fails to compile when using uuid\_v7\_primary\_key in resource](https://forum.elixirforum.com/t/ashgraphql-fails-to-compile-when-using-uuid-v7-primary-key-in-resource/65968)

<div class="topic-metadata">

**Author:** [@sezaru](https://forum.elixirforum.com/u/sezaru)\
**Replies:** 2\
**Last updated:** [September 9, 2024, 4:34pm UTC](https://forum.elixirforum.com/t/ashgraphql-fails-to-compile-when-using-uuid-v7-primary-key-in-resource/65968 "2024-09-09T16:34:57Z")

</div>

I have a resource with uuid\_v7\_primary\_key :id, I’m trying to use AshGraphql with it, but when I try to compile the project, it fails with: == Compilation error in file lib/core/graphql/schema.ex == \*\* (RuntimeError) Co…

---

## [GraphQL relations not available](https://forum.elixirforum.com/t/graphql-relations-not-available/65415)

<div class="topic-metadata">

**Author:** [@scflode](https://forum.elixirforum.com/u/scflode)\
**Replies:** 7\
**Last updated:** [August 9, 2024, 4:05pm UTC](https://forum.elixirforum.com/t/graphql-relations-not-available/65415 "2024-08-09T16:05:52Z")

</div>

Hi there, I created a new Ash project with the helpdesk domain and added AshGraphQL. The problem I have is that the relationship of a ticket to a representative is not showing up in the playground. I followed the getti…

---

## [Policy failure results in raised, unhandled error in ash\_graphql update](https://forum.elixirforum.com/t/policy-failure-results-in-raised-unhandled-error-in-ash-graphql-update/64807)

<div class="topic-metadata">

**Author:** [@moxley](https://forum.elixirforum.com/u/moxley)\
**Replies:** 4\
**Last updated:** [July 11, 2024, 4:41pm UTC](https://forum.elixirforum.com/t/policy-failure-results-in-raised-unhandled-error-in-ash-graphql-update/64807 "2024-07-11T16:41:35Z")

</div>

I’m trying to upgrade from Ash 2 to 3, and I’m stumped on restoring the behavior of one of my ash\_graphql mutations. It’s an update mutation that defines a read\_only :current\_actor, because the current actor is what is b…

---

## [Ash Postgres id column error on update](https://forum.elixirforum.com/t/ash-postgres-id-column-error-on-update/63936)

<div class="topic-metadata">

**Author:** [@BryanJBryce](https://forum.elixirforum.com/u/BryanJBryce)\
**Replies:** 9\
**Last updated:** [June 3, 2024, 11:11pm UTC](https://forum.elixirforum.com/t/ash-postgres-id-column-error-on-update/63936 "2024-06-03T23:11:00Z")

</div>

I’ve got an app with multitenency and I’m trying to do a basic update on on resource via GraphQL using the default update action and I’m getting this error: POST /gql “superhotel.hotellite.local” \[debug\] Processing with…

---

## [AshGraphql error when resolving Aggregate](https://forum.elixirforum.com/t/ashgraphql-error-when-resolving-aggregate/63318)

<div class="topic-metadata">

**Author:** [@BryanJBryce](https://forum.elixirforum.com/u/BryanJBryce)\
**Replies:** 4\
**Last updated:** [May 7, 2024, 6:29pm UTC](https://forum.elixirforum.com/t/ashgraphql-error-when-resolving-aggregate/63318 "2024-05-07T18:29:16Z")

</div>

OrderItem defines the following: calculations do calculate :subtotal, :decimal, expr( type(price, :decimal) \* type(quantity, :decimal) + type(modifiers\_total, :decimal) …

---

## [Aggregates causing error in AshGraphQL](https://forum.elixirforum.com/t/aggregates-causing-error-in-ashgraphql/62112)

<div class="topic-metadata">

**Author:** [@BryanJBryce](https://forum.elixirforum.com/u/BryanJBryce)\
**Replies:** 4\
**Last updated:** [March 9, 2024, 8:05pm UTC](https://forum.elixirforum.com/t/aggregates-causing-error-in-ashgraphql/62112 "2024-03-09T20:05:29Z")

</div>

Orders have many OrderItems have many OrderItemModifiers OrderItem and OrderItemModifier both have attributes of quantity and price I want Order to be able to aggregate/calculate the total for the order. First I looke…

---

## [Stop Subscription resolver without returning a value](https://forum.elixirforum.com/t/stop-subscription-resolver-without-returning-a-value/62172)

<div class="topic-metadata">

**Author:** [@barnabasJ](https://forum.elixirforum.com/u/barnabasJ)\
**Replies:** 0\
**Last updated:** [March 8, 2024, 3:33pm UTC](https://forum.elixirforum.com/t/stop-subscription-resolver-without-returning-a-value/62172 "2024-03-08T15:33:19Z")

</div>

I’m trying to add support for subscriptions to AshGraphql and I got a simple subscription working but now I’m a bit stuck. So far I have added a way to add a new subscription and closed the loop by providing the needed …

[Next page](https://forum.elixirforum.com/tag/ash-graphql/3906.md?match_all_tags=true&page=1&tags%5B%5D=ash-graphql)
