fix: fixed incorrect connection access (#3064)

This commit is contained in:
Wyatt Johnson
2020-08-03 15:21:09 +00:00
committed by GitHub
parent 871d3f80c1
commit 79627af8d6
@@ -100,10 +100,34 @@ const RejectCommentMutation = createMutation(
proxy.setValue(true, "viewerDidModerate");
const connections = [
getQueueConnection(store, "REPORTED", input.storyID),
getQueueConnection(store, "PENDING", input.storyID),
getQueueConnection(store, "UNMODERATED", input.storyID),
getQueueConnection(store, "APPROVED", input.storyID),
getQueueConnection(
store,
"REPORTED",
input.storyID,
input.siteID,
input.section
),
getQueueConnection(
store,
"PENDING",
input.storyID,
input.siteID,
input.section
),
getQueueConnection(
store,
"UNMODERATED",
input.storyID,
input.siteID,
input.section
),
getQueueConnection(
store,
"APPROVED",
input.storyID,
input.siteID,
input.section
),
].filter((c) => c);
connections.forEach((con) =>
ConnectionHandler.deleteNode(con!, input.commentID)