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