[object Object]

GraphQL snipets

ユーザのレポジトリ情報をぶっこ抜く

リファレンス: Repository

レポジトリの主要言語を取る

{
  search(query: "user:tubone24", type: REPOSITORY, first: 100) {
    repositoryCount
    pageInfo {
      endCursor
      startCursor
    }
    edges {
      node {
        ... on Repository {
          id
          name
          createdAt
          description
          isArchived
          isPrivate
          diskUsage
          url
          owner {
            login
            id
            __typename
            url
          }
          assignableUsers {
            totalCount
          }
          licenseInfo {
            key
          }
          languages (first: 100){
            pageInfo {
              endCursor
              startCursor
            }
            totalCount
            edges{
              node{
                name
                color
              }
            }
          }
          primaryLanguage {
            name
            color
          }
          defaultBranchRef {
            target {
              ... on Commit {
                history(first: 10) {
                  totalCount
                  edges {
                    node {
                      ... on Commit {
                        committedDate
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68