mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-01 03:47:36 -05:00
fix: split to packages to support gql gen
This commit is contained in:
124
packages/gql_github/lib/user.graphql
Normal file
124
packages/gql_github/lib/user.graphql
Normal file
@@ -0,0 +1,124 @@
|
||||
fragment RepoParts on Repository {
|
||||
owner {
|
||||
login
|
||||
avatarUrl
|
||||
}
|
||||
name
|
||||
description
|
||||
isPrivate
|
||||
isFork
|
||||
stargazers {
|
||||
totalCount
|
||||
}
|
||||
forks {
|
||||
totalCount
|
||||
}
|
||||
primaryLanguage {
|
||||
color
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
fragment UserParts on User {
|
||||
login
|
||||
name
|
||||
avatarUrl
|
||||
location
|
||||
createdAt
|
||||
company
|
||||
bio
|
||||
url
|
||||
email
|
||||
websiteUrl
|
||||
viewerCanFollow # TODO: remove in viewer query
|
||||
viewerIsFollowing
|
||||
sponsors {
|
||||
totalCount
|
||||
}
|
||||
followers {
|
||||
totalCount
|
||||
}
|
||||
following {
|
||||
totalCount
|
||||
}
|
||||
contributionsCollection {
|
||||
contributionCalendar {
|
||||
weeks {
|
||||
contributionDays {
|
||||
color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
organizations {
|
||||
totalCount
|
||||
}
|
||||
repositories(
|
||||
first: 6
|
||||
ownerAffiliations: OWNER
|
||||
orderBy: { field: STARGAZERS, direction: DESC }
|
||||
) {
|
||||
totalCount
|
||||
nodes {
|
||||
...RepoParts
|
||||
}
|
||||
}
|
||||
starredRepositories {
|
||||
totalCount
|
||||
}
|
||||
gists {
|
||||
totalCount
|
||||
}
|
||||
pinnedItems(first: 6) {
|
||||
nodes {
|
||||
... on Repository {
|
||||
...RepoParts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query Viewer {
|
||||
viewer {
|
||||
...UserParts
|
||||
}
|
||||
}
|
||||
|
||||
query User($login: String!) {
|
||||
user(login: $login) {
|
||||
...UserParts
|
||||
}
|
||||
organization(login: $login) {
|
||||
login
|
||||
avatarUrl
|
||||
name
|
||||
url
|
||||
description
|
||||
location
|
||||
email
|
||||
websiteUrl
|
||||
createdAt
|
||||
viewerIsFollowing
|
||||
sponsors {
|
||||
totalCount
|
||||
}
|
||||
membersWithRole {
|
||||
totalCount
|
||||
}
|
||||
pinnedItems(first: 6) {
|
||||
nodes {
|
||||
... on Repository {
|
||||
...RepoParts
|
||||
}
|
||||
}
|
||||
}
|
||||
pinnableItems(first: 6, types: [REPOSITORY]) {
|
||||
totalCount
|
||||
nodes {
|
||||
... on Repository {
|
||||
...RepoParts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user