github - GraphQL 和 Github
问题描述
我是 graphQL 的新手,因此,我可能做错了什么或没有完全理解某些事情。如果有人能指导我,我会很高兴的!!!
我正在尝试通过从 GH 中提取数据来开发关于 graphQL 的查询。
目标:从团队组中提取作者和日期(他们最后一次在 github 上发布的时间)。
完成:我能够从一个组织和每个团队的成员那里获得所有 12 个团队的名称,但是我无法输出他们上次提交讨论的日期,我尝试使用 (updatedAt) 但这不是我想要的为了。
输出:
{
"data": {
"organization": {
"teams": {
"edges": [
{
"node": {
"name": "Computer",
"description": "value.",
"members": {
"edges": [
{
"node": {
"name": "W A",
"url": "https://github.com/WA"
}
},
{
"node": {
"name": "V A",
"url": "https://github.com/v87"
}
},
{
"node": {
"name": "A",
"url": "https://github.com/A9"
}
},
{
"node": {
"name": "N F",
"url": "https://github.com/NF"
}
},
{
"node": {
"name": null,
"url": "https://github.com/N"
}
},
{
"node": {
"name": null,
"url": "https://github.com/R"
}
}
]
}
}
},
{
"node": {
"name": "Leadership Team",
"description": "leadership positions.",
"members": {
"edges": [
{
"node": {
"name": "W S",
"url": "https://github.com/WS
}
},
代码:
{
organization(login: "...") {
teams(first: 20) {
edges {
node {
name
description
members {
edges {
node {
name
url
}
}
}
}
}
}
}
}
解决方案
推荐阅读
- javascript - 添加使用innerHTML 插入的删除项目功能?
- java - 在ArrayLists java的ArrayList中使用[]
- r - 在 R 中沿向量执行操作 - 仅返回单个值
- julia - Julia:有没有办法返回索引的每个值的迭代器?
- groovy - SoapUI 从文件中读取请求参数(免费版)
- php - 使用php检查mysql表中的现有用户
- python - 如何使用 python 在 3d 轴上排列多个图形?
- java - 尝试在空对象引用上调用虚拟方法“boolean java.lang.String.equals(java.lang.Object)”以读取登录页面的数据
- python - 为什么我的 HTTP Post 请求没有从有效负载中读取数据?
- c# - 使用正则表达式验证特定字符的字符串和精确长度的数字