mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +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;
|
||||
|
||||
Reference in New Issue
Block a user