diff options
author | 2022-12-15 21:13:34 +0530 | |
---|---|---|
committer | 2022-12-15 23:43:34 +0800 | |
commit | 668b90c35d6468a18bfab4472a1f63b25c5ee1af (patch) | |
tree | 361f90b4b75d49d98acc75ca08fd7e824187795c /source/github-helpers/api.ts | |
parent | 8844ddc5d8d83c8e2f3376e8e63f9700e93b4c9d (diff) | |
download | refined-github-668b90c35d6468a18bfab4472a1f63b25c5ee1af.tar.gz refined-github-668b90c35d6468a18bfab4472a1f63b25c5ee1af.tar.zst refined-github-668b90c35d6468a18bfab4472a1f63b25c5ee1af.zip |
Restore `restore-file` feature (#6171)
Co-authored-by: Federico Brigante <me@fregante.com>
Diffstat (limited to 'source/github-helpers/api.ts')
-rw-r--r-- | source/github-helpers/api.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |