We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec6d2ce commit 5946deaCopy full SHA for 5946dea
src/Comment/CommentAdd/index.js
@@ -80,6 +80,23 @@ class CommentAdd extends Component {
80
<Mutation
81
mutation={ADD_COMMENT}
82
variables={{ body: value, subjectId: issue.id }}
83
+ optimisticResponse={{
84
+ addComment: {
85
+ __typename: 'Mutation',
86
+ commentEdge: {
87
+ __typename: 'IssueCommentEdge',
88
+ node: {
89
+ __typename: 'IssueComment',
90
+ id: new Date().getTime() + '',
91
+ author: {
92
+ __typename: 'User',
93
+ login: 'me'
94
+ },
95
+ bodyHTML: value
96
+ }
97
98
99
+ }}
100
update={(client, data) => updateComments({
101
repositoryOwner,
102
repositoryName,
0 commit comments