Skip to content

afaayerhan/graphql-dataloader-boilerplate

 
 

Repository files navigation

GraphQL DataLoader Boilerplate

CircleCI codecov

Very simple boilerplate using GraphQL and DataLoader

Blog Posts

Directory Structure

├── /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

Create-GraphQL

If you want to move faster you should use create-graphql to simplify the creation of a GraphQL Server

Command

Setup

npm install

Develop

npm run watch

Production

# first compile the code
npm run build

# run graphql compiled server
npm start

Flow

npm run flow

Or

flow

REPL server

npm run repl

awesome > M.User.find()

Schema

Update your schema

npm run update-schema

Take a look on the Schema

About

Very simple boilerplate using GraphQL and DataLoader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%