想用 github 的 api 来干点事 https://developer.github.com/v4/
已知 owner 和 name
{
repository(owner: "repository 作者", name: "repository 名称") {
id
}
}
得到 repository 的 id,然后添加个 issue
mutation {
createIssue(input: {title: "test", repositoryId: "repository 的 id"
, projectIds: [], labelIds: [], assigneeIds: []}) {
issue {
id
}
}
}
得到 issue 的 id,最后我要利用这个 id 把这个 issue 关掉
共 3 步操作,很疑惑,GraphQL 到底能不能用一个请求来搞定,怎么搞法?不能的话,我用 restfull 干这事也差不多啊,GraphQL 这玩意学习成本还有点高😂