js_react_apollo__abhiaiyer/server
2017-01-29 22:52:46 +01:00
..
.babelrc Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
.gitignore Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
index.js Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
LICENSE.txt Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
package.json Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
README.md Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
schema.js Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
swapi.js Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00
yarn.lock Original version from Abhi Aiyer. 2017-01-29 22:52:46 +01:00

A GraphQL endpoint for the Star Wars API, generated from the JSON Schema provided.

Running

Install with:

npm install

Run with:

npm start

Running queries

Go to the following URL in your browser to see GraphiQL:

http://localhost:3000/graphql

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.