Add flag deleted with value "true" to comments of deleted users (#2952)

* [Fix] Add deleted as true to comments of deleted users

* fix: revert deleted = true

Co-authored-by: hector.melo <hector.melo@corp.globo.com>
Co-authored-by: Wyatt Johnson <me@wyattjoh.ca>
Co-authored-by: Wyatt Johnson <wyattjoh@gmail.com>
This commit is contained in:
Hector Nieva
2020-05-07 12:46:04 -03:00
committed by GitHub
parent 45873398dd
commit 8ea88f9b96
2 changed files with 4 additions and 0 deletions
@@ -54,6 +54,7 @@ export const Comment: GQLCommentTypeResolver<comment.Comment> = {
: null,
revisionHistory: (c) =>
c.revisions.map((revision) => ({ revision, comment: c })),
deleted: ({ deletedAt }) => !!deletedAt,
editing: ({ revisions, createdAt }, input, ctx) => ({
// When there is more than one body history, then the comment has been
// edited.
@@ -2625,6 +2625,9 @@ type Comment {
"""
deleted: Boolean
"""
site is the Site referenced by the Story for this Comment.
"""
site: Site!
}