dmitriid
At one point I’ll wrap my head around the new changes to resource attributes in Ash, I promise ![]()
Meanwhile here’s an issue I have:
module Quire.Blog.Page do
actions do
defaults [
:read,
:destroy,
create: [
:title,
:slug,
:raw,
:rendered,
:is_published,
:published_at,
:is_tag,
:toc,
:settings,
:is_archived,
:is_private,
:show_on_timeline,
:language
]
]
action :duplicate, :struct do
argument :page_id, :uuid
transaction? true
run fn query, _context ->
id = query.arguments.page_id
{:ok, page} =
__MODULE__.get(id)
|> Ash.load([:media, :tags, :pages, :external_scripts])
new_page = %{
page
| id: nil,
is_published: false,
published_at: nil,
slug: nil,
is_private: false
}
{:ok, new_page} = new_page |> Map.from_struct() |> __MODULE__.create()
...
end
end
This action will fail in create because the input will have quite more fields than just listed attributes: it will have all the calculated fields, and all the aggregations etc.
This worked in Ash 2.x, but now fails in Ash 3.0 with %Ash.Error.Invalid.NoSuchInput for every calculation, aggregate etc. in the provided map.
Is their a fast way to convert this into a proper changeset with inputs. E.g. by filtering only on keys available to the action?
Trending in Questions
One of my LiveView view’s has a very heavy javascript dependency so I want to avoid loading it for every page on the site, while still us...
New
Hi all!
I know that quite a few people use Phoenix LiveView but it is hard to get a more up-to-date list of folks/companies using it. I ...
New
Hello everyone!
I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++.
Does anyone ...
New
I load tested a plain Phoenix chat app backed by Postgres with 100 million messages in it, everything on default settings, to see what br...
New
Hey, I know this has been discussed ad nauseum, but I couldn’t find a definitive answer or at least some consensus around this, so let me...
New
I don’t suppose you can lazy load a library depending on runtime data? For example if it’s a certain user they can lazy load ‘library A’ ...
New
Hey everyone, I have been building a lightweight Phoenix backend aimed at backing up and synchronizing user profiles across mobile device...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
On November 23, 2026, an unauthorized third party exploited a vulnerability in hex.pm (CVE-2026-129514, CVSS 10.0) that let them run comm...
New
Hi everyone :waving_hand:
I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #code-sync
- #exunit
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #ai
- #authentication
- #elixirconf-us
- #umbrella
- #full-time-contract
- #blog-post
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-eu
- #distillery
- #security
- #processes
- #api
- #forms
- #hex











Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dmitriid
I’ve solved it by
where
@create_attributescontains all the necessary fieldszachdaniel
You can also tell Ash what keys to ignore in cases that they are missing:
With that said, being more explicit as you are showing is always better