Can't get policies to work with AshGraphql
I have an action,
My
This works as expected when using the application's Ash API directly:
Setting
However, it doesn't seem to work when going through AshGraphql, when the actor is present:
I know the actor is being set correctly with
However, when I change the policy to match on any action (
update_customer_registration, which requires a Customer actor.My
Customer policy looks like this:This works as expected when using the application's Ash API directly:
Setting
actor to nil, raises an policy error as expected.However, it doesn't seem to work when going through AshGraphql, when the actor is present:
I know the actor is being set correctly with
Ash.PlugHelpers.set_actor()However, when I change the policy to match on any action (
policy always() do), it works. There seems to be something specific with specifying the action in the policy that doesn't work with AshGraphql.