Update my comments after posting

This commit is contained in:
Chi Vinh Le
2017-08-04 22:35:26 +07:00
parent 3ec81099f7
commit 5ceda4f2d2
@@ -73,6 +73,11 @@ const extension = {
created_at
status
replyCount
asset {
id
title
url
}
tags {
tag {
name
@@ -190,6 +195,15 @@ const extension = {
}
return insertCommentIntoEmbedQuery(prev, comment);
},
CoralEmbedStream_Profile: (prev, {mutationResult: {data: {createComment: {comment}}}}) => {
return update(prev, {
me: {
comments: {
nodes: {$unshift: [comment]},
},
},
});
},
}
}),
EditComment: () => ({