diff options
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 17937968..e9ca80af 100644 --- a/source/github-helpers/api.ts +++ b/source/github-helpers/api.ts @@ -186,7 +186,7 @@ export const v4 = mem(async ( Authorization: `bearer ${personalToken}`, }, method: 'POST', - body: JSON.stringify({query: `{${query}}`}), + body: JSON.stringify({query: query.trimStart().startsWith('mutation') ? query : `{${query}}`}), }); const apiResponse: GraphQLResponse = await response.json(); |