|
8 gadi atpakaļ | |
---|---|---|
.. | ||
.babelrc | 8 gadi atpakaļ | |
.gitignore | 8 gadi atpakaļ | |
LICENSE.txt | 8 gadi atpakaļ | |
README.md | 8 gadi atpakaļ | |
index.js | 8 gadi atpakaļ | |
package.json | 8 gadi atpakaļ | |
schema.js | 8 gadi atpakaļ | |
swapi.js | 8 gadi atpakaļ | |
yarn.lock | 8 gadi atpakaļ |
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.