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