Last active
June 29, 2018 08:59
-
-
Save tsukhu/15d5c9e4009bf27aa5bc95099f982009 to your computer and use it in GitHub Desktop.
react-git-explorer-gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { gql } from 'apollo-boost'; | |
const GET_CURSOR_ORG_DATA = gql` | |
query($cursor: String, $org: String = "") { | |
organization(login: $org) { | |
repositories( | |
first: 50 | |
after: $cursor | |
orderBy: { field: PUSHED_AT, direction: DESC } | |
) { | |
totalCount | |
pageInfo { | |
endCursor | |
__typename | |
} | |
edges { | |
cursor | |
node { | |
name | |
descriptionHTML | |
license | |
stargazers(first: 50) { | |
totalCount | |
} | |
repositoryTopics(first: 20) { | |
edges { | |
node { | |
topic { | |
name | |
} | |
} | |
} | |
} | |
forkCount | |
isFork | |
createdAt | |
updatedAt | |
pushedAt | |
homepageUrl | |
url | |
primaryLanguage { | |
name | |
color | |
} | |
collaborators(first: 50, affiliation: DIRECT) { | |
edges { | |
node { | |
name | |
login | |
avatarUrl | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
`; | |
const GET_ORG_DATA = gql` | |
query($org: String = "") { | |
organization(login: $org) { | |
repositories(first: 50, orderBy: { field: PUSHED_AT, direction: DESC }) { | |
totalCount | |
pageInfo { | |
endCursor | |
__typename | |
} | |
edges { | |
node { | |
name | |
descriptionHTML | |
license | |
stargazers(first: 50) { | |
totalCount | |
} | |
repositoryTopics(first: 20) { | |
edges { | |
node { | |
topic { | |
name | |
} | |
} | |
} | |
} | |
forkCount | |
isFork | |
createdAt | |
updatedAt | |
pushedAt | |
homepageUrl | |
url | |
primaryLanguage { | |
name | |
color | |
} | |
collaborators(first: 50, affiliation: DIRECT) { | |
edges { | |
node { | |
name | |
login | |
avatarUrl | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
`; | |
export { GET_CURSOR_ORG_DATA, GET_ORG_DATA }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment