【发布时间】:2021-09-22 15:53:30
【问题描述】:
我真的很难从 GitHub GraphQL api 中获得任何有意义的东西...... 我想获得一个 repos 列表和团队的权限级别。到目前为止我有
Q= """query {
organization(login: "MY_ORG") {
team(slug:"MY_TEAM") {
name
repositories(first:3){
nodes {
name
}
edges {
permission
}
}
}
}
}"""
返回
{'data': {'organization': {'team': {'name': 'MY_TEAM',
'repositories': {'nodes': [{'name': 'REPO1'},
{'name': 'REPO2'},
{'name': 'REPO3'}],
'edges': [{'permission': 'ADMIN'},
{'permission': 'ADMIN'},
{'permission': 'ADMIN'}]}}}}}
但是我看不到任何将权限和存储库名称一起列出的方法,因为无法从 teamrepositoryedge 到存储库节点,反之亦然:/
我觉得我错过了一些明显的东西,只是没有看到它。
【问题讨论】:
标签: github graphql github-api github-graphql