graphql - 从 GitHub GraphQL 获取 repositoryOwner 数组
问题描述
我有这个查询:
query {
repositoryOwner(login: "jcubic") {
repositories(first: 20, orderBy: {field: STARGAZERS, direction: DESC}, privacy: PUBLIC) {
edges {
repository:node {
name
stargazers {
totalCount
}
}
}
}
}
}
是否可以让多个用户而不是单个用户?
解决方案
在帮助下,我能够使用 ID 创建查询(它们来自我和 linus torvalds):
{
nodes(ids: ["MDQ6VXNlcjI4MDI0MQ==", "MDQ6VXNlcjEwMjQwMjU="]) {
... on User {
name
login
}
... on RepositoryOwner {
repositories(first: 20, orderBy: {field: STARGAZERS, direction: DESC}, privacy: PUBLIC) {
edges {
repository: node {
name
stargazers {
totalCount
}
}
}
}
}
}
}
推荐阅读
- c# - 如何使用文件结果在.net core web api中取消正在进行的下载?
- java - 如果我的 searchView 搜索视图中没有任何内容,则显示所有用途为空
- angular - 公共临时 url .Net Core API Angular
- r - 按组更改绘图的 x 轴值和背景颜色
- javascript - 将道具传递到屏幕没有出现拳头时间
- java - Android 过滤“mp3”文件
- databricks - 从 Python 中的 Databricks Filestore 下载 CSV 文件不起作用
- c# - 强制转换为 C# 中的两种类型之一
- python - 控制台关闭时的python执行函数
- ssl - Openssl:我在 1.0.2 和 1.1.1 中使用相同的 TLS 和 CipherSuite,但它们的行为不同