Tag: octokit-js
-
How to avoid specifying field name in Octokit GraphQL
1 Example query: mutation prrt($input: AddPullRequestReviewThreadInput!) { addPullRequestReviewThread(input: $input) { thread { id } } } Using Octokit, I have to type like this: const mutateFn = graphql<{ addPullRequestReviewThread: AddPullRequestReviewThreadPayload; }>; const response = await mutateFn(mutation, { input, headers }); The addPullRequestReviewThread: part is quite long. Can this be automated/inferred somehow? I’d like to just…