|
|
8 лет назад | |
|---|---|---|
| .. | ||
| .babelrc | 8 лет назад | |
| .gitignore | 8 лет назад | |
| LICENSE.txt | 8 лет назад | |
| README.md | 8 лет назад | |
| index.js | 8 лет назад | |
| package.json | 8 лет назад | |
| schema.js | 8 лет назад | |
| swapi.js | 8 лет назад | |
| yarn.lock | 8 лет назад | |
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.