mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 04:20:14 +08:00
Adding hasParent on Comment to the Graph
This commit is contained in:
@@ -69,7 +69,7 @@ class Comment extends React.Component {
|
||||
let selectionStateCSS = selected ? 'mdl-shadow--16dp' : 'mdl-shadow--2dp';
|
||||
|
||||
const queryData = {root, comment, asset: comment.asset};
|
||||
|
||||
console.log(comment);
|
||||
return (
|
||||
<li
|
||||
tabIndex={0}
|
||||
|
||||
@@ -53,6 +53,7 @@ export default withFragments({
|
||||
editing {
|
||||
edited
|
||||
}
|
||||
hasParent
|
||||
${getSlotFragmentSpreads(slots, 'comment')}
|
||||
}
|
||||
`
|
||||
|
||||
@@ -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