Very simple boilerplate using GraphQL and DataLoader
├── /data/ # GraphQL generated schema
├── /repl/ # Read-Eval-Print-Loop (REPL) configuration
├── /scripts/ # Generate GraphQL schema script
├── /src/ # Source code of GraphQL Server
│ ├── /connection/ # Connections types (Relay)
│ ├── /interface/ # NodeInterface (Relay)
│ ├── /loader/ # Loaders of the models using DataLoader
│ ├── /model/ # Models definition (Mongoose, SQL, Google DataStore)
│ ├── /mutation/ # Mutations definition
├── /test/ # Test helpers
If you want to move faster you should use create-graphql to simplify the creation of a GraphQL Server
npm install
npm run watch
# first compile the code
npm run build
# run graphql compiled server
npm start
npm run flow
Or
flow
npm run repl
awesome > M.User.find()
Update your schema
npm run update-schema
Take a look on the Schema