summaryrefslogtreecommitdiff
path: root/source/github-helpers/api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/github-helpers/api.ts')
-rw-r--r--source/github-helpers/api.ts2
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();