首页 文章

Github GraphQL搜索过滤

提问于
浏览
2

基于我有限的搜索,似乎GraphQL只能支持相等的过滤 . 所以,

是否可以使用过滤条件进行Github GraphQL搜索,

  • 星级> 10

  • 分叉> 3

  • 总提交> = 5

  • 总问题> = 1

  • 未解决的问题<= 60

  • 尺寸> 2k

  • 得分> 5

  • 最后更新是在一年之内

即,过滤将满足以上所有条件 . 可能吗?

1 回答

  • 0

    这不是答案,而是对我迄今收集到的内容的更新 .

    • 根据“Select * for Github GraphQL Search ", not all above criteria might be available in the Repository edge. Namely, the "总提交", "未解决问题" and "得分”可能无法使用 .

    • 问题的目的显然是寻找有 Value 的资源库并清除低质量资源库 . 我collected可能对此类评估有帮助的所有可用字段here .

    截至2018-03-18的副本:

    query SearchMostTop10Star($queryString: String!, $number_of_repos:Int!) {
      search(query: $queryString, type: REPOSITORY, first: $number_of_repos) {
        repositoryCount
        edges {
          node {
            ... on Repository {
              name
              url
              description
    #         shortDescriptionHTML
              repositoryTopics(first: 12) {nodes {topic {name}}}
              primaryLanguage {name}
              languages(first: 3) { nodes {name} }
              releases {totalCount}
              forkCount
              pullRequests {totalCount}
              stargazers {totalCount}
              issues {totalCount}
              createdAt
              pushedAt
              updatedAt
            }
          }
        }
      }
    }
    variables {
      "queryString": "language:JavaScript stars:>10000", 
      "number_of_repos": 3 
    }
    

    任何人都可以试试as per here .

相关问题