forked from maxam2017/productive-box
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
queries.ts
44 lines (42 loc) 路 859 Bytes
/
queries.ts
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
export const userInfoQuery = `
query {
viewer {
login
id
}
}
`;
export const createContributedRepoQuery = (username: string) => `
query {
user(login: "${username}") {
repositoriesContributedTo(last: 100, includeUserRepositories: true) {
nodes {
isFork
name
owner {
login
}
}
}
}
}
`;
export const createCommittedDateQuery = (id: string, name: string, owner: string) => `
query {
repository(owner: "${owner}", name: "${name}") {
ref(qualifiedName: "master") {
target {
... on Commit {
history(first: 100, author: { id: "${id}" }) {
edges {
node {
committedDate
}
}
}
}
}
}
}
}
`;