From ddf7d590fd22ab535c164b54f25e094afb33cc69 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 31 Jan 2024 21:04:21 +0800 Subject: [PATCH] Copy params so no extra params are sent --- .../mutations/mergeHighlightMutation.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/web/lib/networking/mutations/mergeHighlightMutation.ts b/packages/web/lib/networking/mutations/mergeHighlightMutation.ts index 4b7d23bda..9da67bb8d 100644 --- a/packages/web/lib/networking/mutations/mergeHighlightMutation.ts +++ b/packages/web/lib/networking/mutations/mergeHighlightMutation.ts @@ -57,7 +57,22 @@ export async function mergeHighlightMutation( ` try { - const data = await gqlFetcher(mutation, { input }) + const data = await gqlFetcher(mutation, { + input: { + id: input.id, + shortId: input.shortId, + articleId: input.articleId, + patch: input.patch, + quote: input.quote, + prefix: input.prefix, + suffix: input.suffix, + html: input.html, + annotation: input.annotation, + overlapHighlightIdList: input.overlapHighlightIdList, + highlightPositionPercent: input.highlightPositionPercent, + highlightPositionAnchorIndex: input.highlightPositionAnchorIndex, + }, + }) const output = data as MergeHighlightOutput | undefined return output?.mergeHighlight.highlight } catch {