Frederic G. MARAND 62cb217de9 Original version from Abhi Aiyer. | il y a 7 ans | |
---|---|---|
.. | ||
.babelrc | il y a 7 ans | |
.gitignore | il y a 7 ans | |
LICENSE.txt | il y a 7 ans | |
README.md | il y a 7 ans | |
index.js | il y a 7 ans | |
package.json | il y a 7 ans | |
schema.js | il y a 7 ans | |
swapi.js | il y a 7 ans | |
yarn.lock | il y a 7 ans |
A GraphQL endpoint for the Star Wars API, generated from the JSON Schema provided.
Install with:
npm install
Run with:
npm start
Go to the following URL in your browser to see GraphiQL:
Here's an example of a query you can run:
{
people {
name,
starships {
name,
length
}
}
}
The server console will print a list of all of the URLs fetched. Thanks to dataloader, we only request each URL once instead of loading it for each subtree of the query.