Skip to content

Instantly share code, notes, and snippets.

@vinkrish
Last active January 15, 2019 09:54
Show Gist options
  • Save vinkrish/99c38bdade8b0e96129fc68d5ed2561a to your computer and use it in GitHub Desktop.
Save vinkrish/99c38bdade8b0e96129fc68d5ed2561a to your computer and use it in GitHub Desktop.
# Comment
{
graphQLHub
github {
// Object Field
user(username: "clayallsopp") { // username is Field arguments
login // Scalar Field
id
avatar_url
}
// Object Feild End
repo(ownerUsername: "clayallsopp", name: "graphqlhub") {
id
name
issues(limit: 1) {
id
state
title
}
branches(limit: 1) {
name
lastCommit {
...commit
}
}
commits(limit: 1) {
...commit
}
}
}
}
fragment status on GithubStatus {
state
description
target_url
context
updated_at
}
fragment commit on GithubCommit {
sha
message
status {
...status
}
author {
// Inline Fragments
... on GithubUser {
login
id
}
// Inline Fragments End
... on GithubCommitAuthor {
email
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment