Ash FrameworkAF
Ash Framework3y ago
11 replies
moxley

Actor not passed to `read` action after `create` action

I have a resource with a default :create action and :read action, and an AshGraphql mutation that calls :create. The resource has a module-based policy that requires the actor have a certain "role". When I test the mutation, the policy allows the actor to perform the :create, but when it checks the :read action that happens at the end of the mutation, the actor passed to the policy is nil.

What makes this especially confusing is that I have other resources that are set up the same way, and they don't have this nil actor problem.

I'll post my code in the comments below.
Was this page helpful?