From d63422a4c203c5e890b52880009e62b6883b8e8b Mon Sep 17 00:00:00 2001 From: okbel Date: Tue, 27 Feb 2018 15:16:40 -0300 Subject: [PATCH] Not reading the fragment just updating --- .../talk-plugin-rich-text-pell/client/index.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/plugins/talk-plugin-rich-text-pell/client/index.js b/plugins/talk-plugin-rich-text-pell/client/index.js index d7e593f75..8df2113aa 100644 --- a/plugins/talk-plugin-rich-text-pell/client/index.js +++ b/plugins/talk-plugin-rich-text-pell/client/index.js @@ -1,5 +1,4 @@ import Editor from './containers/Editor'; -import update from 'immutability-helper'; import CommentContent from './containers/CommentContent'; import { gql } from 'react-apollo'; @@ -55,21 +54,12 @@ export default { const fragmentId = `Comment_${id}`; - const data = proxy.readFragment({ - fragment: editCommentFragment, - id: fragmentId, - }); - - const updated = update(data, { - richTextBody: { - $set: edit.richTextBody, - }, - }); - proxy.writeFragment({ fragment: editCommentFragment, id: fragmentId, - data: updated, + data: { + richTextBody: edit.richTextBody, + }, }); }, };