Closed jaulz closed 1 week ago
I would like to still return the model that was just deleted
Why though? I am starting to doubt if Lighthouse should do that.
I guess you are right... I had that REST pattern in mind that you return the entity that you deleted so you can restore it afterwards. With GraphQL we could potentially run the query to read it before the mutation happens in the same request.
Changes
Right now, it's not possible to return deleted models and query relations at the same time. For example, when running a mutation that deletes a model I would like to still return the model that was just deleted but if any of its relations is queried as well it will run into an exception, e.g.:
This PR serves as a draft and is open to discussion how to handle for example the following cases:
Breaking changes
tbd