master
1fragment Commit on Commit {
2 id
3 sha: oid
4 committedDate
5 message
6 messageBody
7 additions
8 deletions
9 author {
10 user {
11 login
12 }
13 }
14 committer {
15 user {
16 login
17 }
18 }
19 repository {
20 owner {
21 login
22 }
23 name
24 }
25}
26
27fragment History on Repository {
28 defaultBranchRef {
29 target {
30 ... on Commit {
31 history(first: $num, after: $cursor, author: { id: $author }) {
32 totalCount
33 nodes {
34 ...Commit
35 }
36 pageInfo {
37 hasNextPage
38 endCursor
39 }
40 }
41 }
42 }
43 }
44}
45
46query CommitsQuery($id: ID!, $author: ID!, $num: Int = 100, $cursor: String) {
47 node(id: $id) {
48 ...History
49 }
50 rateLimit {
51 limit
52 cost
53 remaining
54 resetAt
55 }
56}
57
58query CommitsBatchQuery(
59 $ids: [ID!]!
60 $author: ID!
61 $num: Int = 100
62 $cursor: String
63) {
64 nodes(ids: $ids) {
65 id
66 ...History
67 }
68 rateLimit {
69 limit
70 cost
71 remaining
72 resetAt
73 }
74}