Frederic G. MARAND 62cb217de9 Original version from Abhi Aiyer. | vor 7 Jahren | |
---|---|---|
.. | ||
.babelrc | vor 7 Jahren | |
.gitignore | vor 7 Jahren | |
LICENSE.txt | vor 7 Jahren | |
README.md | vor 7 Jahren | |
index.js | vor 7 Jahren | |
package.json | vor 7 Jahren | |
schema.js | vor 7 Jahren | |
swapi.js | vor 7 Jahren | |
yarn.lock | vor 7 Jahren |
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.