Skip to content

Instantly share code, notes, and snippets.

@MoatazAbdAlmageed
Last active April 6, 2020 14:42
Show Gist options
  • Save MoatazAbdAlmageed/9f1215d5abf1b090ebf92b9377a6d46d to your computer and use it in GitHub Desktop.
Save MoatazAbdAlmageed/9f1215d5abf1b090ebf92b9377a6d46d to your computer and use it in GitHub Desktop.
graphqlhub
query graphQLHub($userName: String!, $includeRepos: Boolean!) {
github {
user(username: $userName) {
login
id
avatar_url
repos @include(if: $includeRepos) {
...repoInfo
}
}
}
}
fragment repoInfo on GithubRepo {
repoName: name
commits{
message
author{
# in line fragment
... on GithubUser{
login
}
... on GithubCommitAuthor{
email
}
}
}
}
{
"userName": "MoatazAbdAlmageed",
"includeRepos": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment