Frederic G. MARAND 62cb217de9 Original version from Abhi Aiyer. | пре 7 година | |
---|---|---|
.. | ||
.babelrc | пре 7 година | |
.gitignore | пре 7 година | |
LICENSE.txt | пре 7 година | |
README.md | пре 7 година | |
index.js | пре 7 година | |
package.json | пре 7 година | |
schema.js | пре 7 година | |
swapi.js | пре 7 година | |
yarn.lock | пре 7 година |
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.