Not reading the fragment just updating

This commit is contained in:
okbel
2018-02-27 15:16:40 -03:00
parent 73355ab542
commit d63422a4c2
@@ -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,
},
});
},
};