Created
November 16, 2018 12:32
-
-
Save obahareth/27dee97371f72dc1c63d886580b24af2 to your computer and use it in GitHub Desktop.
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
{ | |
# The first 2 films, after a given cursor value | |
allFilms(first: 2, after: "YXJyYXljb25uZWN0aW9uOjA=") { | |
# An edge is an entry in a "list" | |
edges { | |
# Get a cursor value for each "edge" | |
# Used for pagination, in combination with filters like | |
# before and after. | |
cursor | |
# Each edge has a node, where the node has | |
# the data we're interested in | |
node { | |
# Film title, release date, and director | |
title | |
releaseDate | |
director | |
# The first 2 species that appeared in this film | |
speciesConnection(first: 2) { | |
edges { | |
node { | |
# The name of the species | |
name | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
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
{ | |
"data": { | |
"allFilms": { | |
"edges": [ | |
{ | |
"cursor": "YXJyYXljb25uZWN0aW9uOjE=", | |
"node": { | |
"title": "The Empire Strikes Back", | |
"releaseDate": "1980-05-17", | |
"director": "Irvin Kershner", | |
"speciesConnection": { | |
"edges": [ | |
{ | |
"node": { | |
"name": "Human" | |
} | |
}, | |
{ | |
"node": { | |
"name": "Droid" | |
} | |
} | |
] | |
} | |
} | |
}, | |
{ | |
"cursor": "YXJyYXljb25uZWN0aW9uOjI=", | |
"node": { | |
"title": "Return of the Jedi", | |
"releaseDate": "1983-05-25", | |
"director": "Richard Marquand", | |
"speciesConnection": { | |
"edges": [ | |
{ | |
"node": { | |
"name": "Human" | |
} | |
}, | |
{ | |
"node": { | |
"name": "Droid" | |
} | |
} | |
] | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment