Your First GraphQL Server
Clay Allsopp
85129

For anyone doing the tutorial now →

  1. “$ npm init”
  2. “$ npm i babel-register — save” instead of “$ npm install babel — save”
  3. Install the Babel es 2015 preset with “$ npm i babel-preset-es2015”
  4. create the .babelrc file so Babel will know that it’s supposed to run in the project → 
    “$ echo ‘{ “presets”: [“es2015”] }’ > .babelrc”

Also make sure you split the code, Clay initially puts all code in one gist and it looks like it’s supposed to be in the index.js file but it should be:

// index.js — put this in the index.js file

.
.
.

// server.js — put this in the server.js file

.
.
.