Skip to content

Conversation

@nsams
Copy link
Member

@nsams nsams commented Dec 19, 2025

Description

This is for implementing a soft delete with unchanged api, no possibility to query deleted entries.

This changes the delete mutation to set deletedAt to current date instead of calling remove()

The filter to exclude deleted entries by default has to be added manually to the entity, API Generator can't do that.

Possibly breaking: we might consider this breaking as it changes behavior when a deletedAt column exists. But it is needed in a project...

…lete mutation

Note: The filter to exclude deleted entries by default has to be added manually to the entity, api-generator can't do that.
@nsams nsams requested a review from johnnyomair December 19, 2025 13:43
@nsams nsams self-assigned this Dec 19, 2025
@johnnyomair johnnyomair changed the title Api Generator: Add support for soft delete by setting deletedAt in delete mutation API Generator: Add support for soft delete by setting deletedAt in delete mutation Dec 22, 2025
Copy link
Collaborator

@johnnyomair johnnyomair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would soft deletes work with relations? Would the relations still be queryable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants