| 
				
					 | 
			před 8 roky | |
|---|---|---|
| .. | ||
| .babelrc | před 8 roky | |
| .gitignore | před 8 roky | |
| LICENSE.txt | před 8 roky | |
| README.md | před 8 roky | |
| index.js | před 8 roky | |
| package.json | před 8 roky | |
| schema.js | před 8 roky | |
| swapi.js | před 8 roky | |
| yarn.lock | před 8 roky | |
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.