Created
November 29, 2016 10:55
-
-
Save katopz/4bee5d0f160e9430b46171e22cd09111 to your computer and use it in GitHub Desktop.
GraphQL Github Example : Search for top ten stargazers via query with fragment
This file contains hidden or 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
// Try at : https://graphql-explorer.githubapp.com/ | |
// With query variables below | |
// { "queryString": "language:JavaScript stars:>10000" } | |
query SearchMostTop10Star($queryString: String!) { | |
search(query: $queryString, type: REPOSITORY, first: 10) { | |
repositoryCount | |
edges { | |
node { | |
..._Repository | |
} | |
cursor | |
} | |
} | |
} | |
fragment _Repository on Repository { | |
name | |
descriptionHTML | |
stargazers { | |
totalCount | |
} | |
forks { | |
totalCount | |
} | |
updatedAt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment