From 668b90c35d6468a18bfab4472a1f63b25c5ee1af Mon Sep 17 00:00:00 2001 From: Vedant K Date: Thu, 15 Dec 2022 21:13:34 +0530 Subject: Restore `restore-file` feature (#6171) Co-authored-by: Federico Brigante --- source/github-helpers/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/github-helpers/api.ts') diff --git a/source/github-helpers/api.ts b/source/github-helpers/api.ts index 1ea37962..dc22f1ec 100644 --- a/source/github-helpers/api.ts +++ b/source/github-helpers/api.ts @@ -187,7 +187,7 @@ export const v4 = mem(async ( Accept: 'application/vnd.github.merge-info-preview+json', }, method: 'POST', - body: JSON.stringify({query: `{${query}}`}), + body: JSON.stringify({query: query.trimStart().startsWith('mutation') ? query : `{${query}}`}), }); const apiResponse: GraphQLResponse = await response.json(); -- cgit v1.2.3