Closed davidebriani closed 3 months ago
The "looks like nothing is related" bit is pretty complex. We can try to "simulate" this in ash
which is that when relationships are loaded on a query for deletion we could just run the query first, save the relationship data, and then delete without the load. That way we could give a best effort of what the relationships look like. If you think about what its asking its actually kind of ambiguous anyway though, like are you asking for "what it looks like afterwards"? If so, the destroy actions should probably not return anything at all TBH. Anyway, that can be its own conversation :)
@davidebriani are the tests meant to be failing? Is this PR demonstrating a bug?
Or does it just need latest fixes from ash
?
@zachdaniel the tests should work with the latest version of Ash. I assume you'd want to tag an Ash release first, update deps here, and finally I'll rebase the PR
I guess either way, merging it should be fine. The subprojects test in ash
will tell us.
🚀 Thank you for your contribution! 🚀
Following on ash-project/ash#1234, this PR adds tests to verify that relationships can be queried on the results of GraphQL queries and mutations.
Querying paginated relationships on the result of deletions doesn't correctly work yet. Indeed, Ash currently queries relationships using a lateral join but after the resource deletion has happened, so it looks like nothing is related.
Contributor checklist