github - Github graphQL订购

标签 github graphql github-graphql

我有一个GraphQL查询。
我不明白为什么它不起作用。

{
  repositoryOwner(login: "Naramsim") {
    login
    repositories(first: 3, isFork: true, orderBy: {field: CREATED_AT}) {
      edges {
        node {
          description
        }
      }
    }
  }
}

Link

最佳答案

你有个错误

Argument 'orderBy' on Field 'repositories' has an invalid value.
Expected type 'RepositoryOrder'.

您忘记指定标记为强制性的方向。这将起作用:
{
  repositoryOwner(login: "Naramsim") {
    login
    repositories(first: 3, isFork: true,  orderBy: {field: CREATED_AT, direction: ASC}) {
      edges {
        node {
          description
        }
      }
    }
  }
}

关于github - Github graphQL订购,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39551325/

相关文章:

github - GitKraken 上新 Pull 请求的头部无效

github - 如何使用 github graphQL API 获取分支的 zipballUrl?

git - 我可以 pull 一个尚未 merge 的 pull 请求吗?

join - 公用列上的graphQL连接

javascript - 使用 Auth0 和 Scaphold 的 GraphQL 登录

functional-programming - 如何将数据连接到 react-router-relay 中的深层组件?

github - 在一次调用中从 Github Graphql API 获取有关多个存储库的信息

git - 在分支创建并 merge 到 pull 请求后,分支上的提交会发生什么?

php - 修改 Symfony Composer 供应商并使用它们直到他们的 PR 被 merge