Last active
May 19, 2020 10:18
-
-
Save shershen08/70c7d4b502bf94cef0c1a5f726b03011 to your computer and use it in GitHub Desktop.
sample quieries for GitHub GraphQL API
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
#1 | |
query { | |
topic(name:"graphql") { | |
relatedTopics{ | |
name | |
} | |
} | |
} | |
#2 | |
query { | |
repository(name:"graphql-spqr-samples", owner:"leangen") { | |
pushedAt | |
shortDescriptionHTML | |
pullRequests(states:OPEN){ | |
totalCount | |
} | |
issues(states:OPEN){ | |
totalCount | |
} | |
languages(first:5) { | |
edges { | |
node { | |
color | |
name | |
} | |
} | |
} | |
} | |
} | |
#3 | |
query user($name: String!) { | |
user(login: $name) { | |
name | |
pinnedItems(first:2){ | |
nodes{ | |
__typename | |
} | |
} | |
repositories(first:5) { | |
nodes { | |
name | |
} | |
} | |
} | |
} | |
#3 - vars | |
{ | |
"name": "your-name-here" | |
} | |
#4 issues | |
query { | |
viewer { | |
login | |
issues(first:5) { | |
edges { | |
node { | |
id | |
title | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment