Soft Delete
Hide comments while preserving data for moderation workflows and audit trails
Hard Delete
Permanently remove comment data, reactions, and replies from the system
Moderation Control
Manage flagged content with appropriate deletion methods
Permission Rules
Users can delete their own comments, moderators can delete any comment
Hard delete permanently removes all comment data including reactions and replies. This action cannot be undone.
Deletion Types
Understanding when to use soft delete versus hard delete is crucial for effective content moderation and data management.Deletion Type | Use Case | Data Retention | Reversible | Best For |
---|---|---|---|---|
Soft Delete | Content moderation, policy violations | Data preserved with isDeleted: true | Yes | Flagged content, temporary removal |
Hard Delete | Inappropriate content, GDPR compliance | Data permanently removed | No | Spam, severe violations, data purging |
Soft delete is the default behavior when the
hardDelete
parameter is not specified or set to false
.Parameters
Parameter | Type | Required | Description |
---|---|---|---|
commentId | String | Yes | Unique identifier of the comment to delete |
hardDelete | Boolean | No | true for permanent removal, false for soft delete (default) |
Soft deleted comments can maintain their position in a collection and preserve all metadata for audit purposes.
Hard delete removes ALL associated data including:
- Comment text and metadata
- All reactions and reactions metadata
- All replies to the comment
- File attachments and media
- Engagement analytics data
Best Practices
Use Soft Delete First
Start with soft delete for most moderation cases to preserve data for audit purposes.
Confirm Hard Deletes
Always show confirmation dialogs before permanent deletions to prevent accidental data loss.
Permission Checks
Validate user permissions before allowing any deletion operations to maintain security.
UI Feedback
Provide clear visual feedback about deletion status and any errors that occur during the process.
Related Topics
Create Comment
Learn how to create new comments with text and media content
Edit Comment
Understand comment editing functionality and user permissions
Query Comments
Explore comment retrieval with filtering for deleted content
Comment Reactions
Manage reactions and engagement on comment content
Moderation Tools
Access advanced moderation features in the console
User Management
Learn about user roles and permission management