From 153c5acce1370dd98bde7f0bebffbbc3d89ee20c Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 28 Aug 2017 19:15:29 +0700 Subject: [PATCH] Only load my own comments in history --- client/coral-settings/containers/ProfileContainer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/coral-settings/containers/ProfileContainer.js b/client/coral-settings/containers/ProfileContainer.js index e6dad3899..4a9aea911 100644 --- a/client/coral-settings/containers/ProfileContainer.js +++ b/client/coral-settings/containers/ProfileContainer.js @@ -37,7 +37,7 @@ class ProfileContainer extends Component { limit: 5, cursor: this.props.root.me.comments.endCursor, }, - updateQuery: (previous, {fetchMoreResult:{comments}}) => { + updateQuery: (previous, {fetchMoreResult:{me: {comments}}}) => { const updated = update(previous, { me: { comments: { @@ -124,8 +124,10 @@ const CommentFragment = gql` const LOAD_MORE_QUERY = gql` query TalkSettings_LoadMoreComments($limit: Int, $cursor: Date) { - comments(query: {limit: $limit, cursor: $cursor}) { - ...TalkSettings_CommentConnectionFragment + me { + comments(query: {limit: $limit, cursor: $cursor}) { + ...TalkSettings_CommentConnectionFragment + } } } ${CommentFragment}