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 specify the payload type AddPullRequestReviewThreadPayload
. Or is this required in all GraphQL?