mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Not reading the fragment just updating
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user