twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Add deleteOneObject mutation

Open Weiko opened this issue 1 year ago • 0 comments

Context

DeleteOneObject was wrongly enabled on the BE, we should not have enabled it because nestjs-query generated method didn't have enough context to delete all the entities (relations, DB objects/fields migrations etc...) This PR aims to fix that and replace the generic method by a new one implementing the deletion of relation fields, foreign key fields, generating and executing the migrations of dropping the foreign key columns and the table.

We have to create a custom resolver because contrary to create and update input types generated by nestjs-query, they are not generic types and we can't pass a custom class to inject the workspaceId.

Weiko avatar Jan 29 '24 17:01 Weiko