Skip to content

Instantly share code, notes, and snippets.

@katopz
Created November 29, 2016 10:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katopz/4bee5d0f160e9430b46171e22cd09111 to your computer and use it in GitHub Desktop.
Save katopz/4bee5d0f160e9430b46171e22cd09111 to your computer and use it in GitHub Desktop.
GraphQL Github Example : Search for top ten stargazers via query with fragment
// 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