Return aggregate after GraphQL mutation
I have an aggregate defined like this:
And GraphQL queries defined like this:
When I call
get_venue2
or list_venues2
, and the query requests the aggregate, the aggregate returns successfully.
When I call update_venue2
, and request the aggregate, it fails with a forbidden
error in the response. Removing the aggregate from the query makes the error go away, but now I don't have the aggregate I need. Apparently, whatever automatic passing of the actor to the aggregate that happens in the read queries isn't happening with the mutation.
Is there a solution for this?4 Replies
And my policy looks like this:
The same result happens if I open the policy to this:
🤔 are you on the latest
ash_graphql
and ash
?
There were some changes to data loading for mutations very recently
I've got it reproduced actually
looking into it now
ah, no nevermind, I had a typo
I can confirm that an aggregate in an application of mine that reads a resource w/ policies is getting the correct user.
and its on the latest of everything. I think we've worked out the last bugs from the relatively big underlying ash_graphql
changes we made recently
So it should be stable to upgradeI upgraded all the ash* dependencies. After a wild ride adjusting to the breaking changes, now it's working!
what breaking changes did you have to deal with? 😢 sorry about that