mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
Adding hasParent on Comment to the Graph
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
const {decorateWithTags} = require('./util');
|
||||
|
||||
const Comment = {
|
||||
hasParent({parent_id}) {
|
||||
return !!parent_id;
|
||||
},
|
||||
parent({parent_id}, _, {loaders: {Comments}}) {
|
||||
if (parent_id == null) {
|
||||
return null;
|
||||
|
||||
@@ -339,6 +339,9 @@ type Comment {
|
||||
|
||||
# describes how the comment can be edited
|
||||
editing: EditInfo
|
||||
|
||||
# Indicates if it has a parent
|
||||
hasParent: Boolean
|
||||
}
|
||||
|
||||
# CommentConnection represents a paginable subset of a comment list.
|
||||
|
||||
Reference in New Issue
Block a user