|
|
преди 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.