Skip to content

Commit 601a0cd

Browse files
committed
remove unnecessary updateQuery for newVote susbcriptions
1 parent fb49eb0 commit 601a0cd

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/components/LinkList.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,15 @@ class LinkList extends Component {
114114
}
115115
}
116116
`,
117-
updateQuery: (previous, { subscriptionData }) => {
118-
const newAllLinks = [subscriptionData.data.newLink.node, ...previous.feed.links]
117+
updateQuery: (previous, { subscriptionData }) => {
118+
const newAllLinks = [
119+
subscriptionData.data.newLink.node,
120+
...previous.feed.links,
121+
]
119122
const result = {
120123
...previous,
121124
feed: {
122-
links: newAllLinks
125+
links: newAllLinks,
123126
},
124127
}
125128
return result
@@ -157,14 +160,6 @@ class LinkList extends Component {
157160
}
158161
}
159162
`,
160-
updateQuery: (previous, { subscriptionData }) => {
161-
const newAllLinks = previous.feed.links.slice()
162-
const result = {
163-
...previous,
164-
allLinks: newAllLinks,
165-
}
166-
return result
167-
},
168163
})
169164
}
170165
}

0 commit comments

Comments
 (0)