From 222f768266e8f9057db61af8a8d9fafcddcbb85b Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 16 Aug 2021 19:30:49 +0100 Subject: [PATCH] Try again --- src/discussions-trigger.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/discussions-trigger.ts b/src/discussions-trigger.ts index 63a3f34c..8353ea63 100644 --- a/src/discussions-trigger.ts +++ b/src/discussions-trigger.ts @@ -124,9 +124,9 @@ async function addLabel(discussion: Discussion, labelName: string, description?: labelID = existingLabel.label.id; } else { const color = "eeeeee"; - const responseSubquery = "labelable { ... on Discussion { id } }"; + const responseSubquery = "label { id }"; const newLabel = await client.mutate(createMutation("createLabel" as any, { name: labelName, repositoryId: existingLabel.repoID, color, description }, responseSubquery)) as any; - labelID = newLabel.data.labelable.id; + labelID = newLabel.data.label.id; } await client.mutate(createMutation("addLabelsToLabelable" as any, { labelableId: discussion.node_id, labelIds: [labelID] })); }