After upgrading to the ash v3 and ash_graphql v1.1, update mutation with read_action is having an issue in our simple data layer resource
actions do
default [:read, :update]
read :read_post do
...
end
update :update_post do
...
end
end
mutations do
update :update_post, :update_post, read_action: :read_post, identity: false
end
It always defaults to the primary action even though it's specified to use the custom read action. If the custom read action is set to primary then it works. Here is the error message.
11:29:51.300 [error] a55f43fb-2809-4315-bd89-30a1382d2636: Exception raised while resolving query.
** (Ash.Error.Framework) Framework Error
* No data provided to resource Elixir.SomePackage.Post. Perhaps you are missing a call to `Ash.DataLayer.Simple.set_data/2`?.
Another common cause of this is failing to add a data layer for a resource. You can add a data layer like so:
`use Ash.Resource, data_layer: Ash.DataLayer.Ets`
Describe the bug
After upgrading to the ash v3 and ash_graphql v1.1, update mutation with read_action is having an issue in our simple data layer resource
It always defaults to the primary action even though it's specified to use the custom read action. If the custom read action is set to primary then it works. Here is the error message.
To Reproduce
I've created a test for this in my forked repo
https://github.com/jichon/ash_graphql