• This repository has been archived on 26/Jun/2019
  • Stars
    star
    394
  • Rank 108,655 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Very simple boilerplate using GraphQL and DataLoader

Deprecated

Try a better version here https://github.com/entria/entria-fullstack

GraphQL DataLoader Boilerplate

CircleCI codecov

Boilerplate using GraphQL and DataLoader

⭐ TypeScript ⭐

Check it out TS version of this boilerplate: https://github.com/entria/graphql-dataloader-boilerplate-ts

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
β”‚   β”œβ”€β”€ /core/               # Core types and helper files, can be used like a global module
β”‚   β”œβ”€β”€ /interface/          # NodeInterface (Relay) and other GraphQL Interfaces
β”‚   β”œβ”€β”€ /modules/            # Modules (think on modules like isolated pieces of your code)
β”‚   β”‚   │── /mutation/       # Module mutations (add an index file to be used on MutationType)
β”‚   β”‚   │── /subscription/   # Module subscriptions (add an index file to be used on SubscriptionType)
β”‚   β”‚   │── /enum/           # Enums related to this module
β”œβ”€β”€ /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

yarn install

Note: If you do not have mongodb installed, please install it:

brew install mongodb

Develop

yarn watch

Test

yarn test

Or

yarn test:watch

Docker and docker-compose

No needs for installing dependencies or running mongod in another terminal window

docker-compose build && docker-compose up

Test

docker-compose -f docker-compose.test.yml build && docker-compose -f docker-compose.test.yml up

Production

# first compile the code
yarn build

# run graphql compiled server
yarn start

Flow

yarn flow

Or

flow

REPL server

yarn repl

awesome > const user = await M.User.find()

Yep, await syntax works on the repl, it is awesome, tks @princejwesley (https://gist.github.com/princejwesley/a66d514d86ea174270210561c44b71ba)

Schema

Update your schema

yarn update-schema

Take a look on the Schema

More Repositories

1

entria-fullstack

Monorepo Playground with GraphQL, React, React Native, Relay Modern, TypeScript and Jest
TypeScript
495
star
2

jobs

Come and join the Entria team
JavaScript
396
star
3

react-native-view-overflow

Fix Overflow in react-native for Android
Objective-C
302
star
4

koa-passport-mongoose-graphql

Koa 2 server with Passport + Mongoose + GraphQL
JavaScript
193
star
5

react-native-fontawesome

React Native Font Awesome Icons
JavaScript
177
star
6

ReactNavigationRelayModern

React Navigation integration with Relay
JavaScript
173
star
7

awesome-pix

Awesome PIX
145
star
8

graphql-mongoose-loader

GraphQL Mongoose Loader helpers
TypeScript
115
star
9

graphql-mongo-helpers

GraphQL + MongoDB helpers that scale
TypeScript
82
star
10

react-app-loader

Production ready library for handling Microfrontends
JavaScript
75
star
11

entria-deploy

Entria Deploy helpers
TypeScript
56
star
12

graphql-vigilant-bot

Github Bot to find breaking changes in your schema.graphql
JavaScript
55
star
13

guidelines

Entria Guidelines - this is how we build software!
52
star
14

hyperledger-fabric-graphql-boilerplate

Hyperledger Fabric GraphQL Boilerplate
JavaScript
45
star
15

font-generator

Generate ttf font and Icons.js for React Native usage
JavaScript
45
star
16

graphql-dataloader-boilerplate-ts

Entria's https://github.com/entria/graphql-dataloader-boilerplate using TypeScript
TypeScript
44
star
17

graphql-find-breaking-changes-cli

Find Breaking Changes against 2 .graphql schema versions
JavaScript
44
star
18

codemods

Node.js/Javascript codemods used at @entria
TypeScript
40
star
19

awesome-woovi-challenge

Awesome Woovi Challenges
37
star
20

docker-react-native-android

Docker image used to build React Native projects for Android
Dockerfile
28
star
21

graphql-optimizing

GraphQL Request Watterfalls Optimizations
JavaScript
27
star
22

react-native-visa-checkout

Objective-C
27
star
23

restria

Entria's REST API boilerplate
JavaScript
27
star
24

woovi-playground

TypeScript
24
star
25

apiWithLog

Powerful Fetch
TypeScript
22
star
26

entria-components

Entria common components
JavaScript
19
star
27

entria-graphql

GraphQL Generators for Entria Projects
JavaScript
19
star
28

relay-utils

Relay utility methods
JavaScript
17
star
29

flow-typed-wip

A central repository for Flow-Typed WIP library definitions
17
star
30

responsiveness

Responsive style tools for ReactJS
JavaScript
15
star
31

node-printer

node-printer fork
C++
14
star
32

api

API wrapper on top of fetch using flow generics
JavaScript
14
star
33

graphql-pg-loader

GraphQL PG Loader and Connection helpers
14
star
34

mongo-aggregate-lodash

Mongo aggregate helpers similar to lodash utilities
JavaScript
13
star
35

datalist

Turns your data into a table with Relay Modern RefetchContainer
JavaScript
12
star
36

toNamedParametersCodemod

I bet you gonna need this
TypeScript
12
star
37

formia

Entria forms
JavaScript
11
star
38

graphql-dataloader-boilerplate-reason

JavaScript
10
star
39

yarn-package-boilerplate

An Yarn package with babel, jest, flow, prettier and more
JavaScript
9
star
40

entria-workshop

JavaScript
9
star
41

atom-entria-snippets

Atom Snippets for React, React Router, Redux, GraphQL and Relay
JavaScript
9
star
42

woovi-dev

Some Woovi development files
9
star
43

entria-utils

JavaScript
8
star
44

cli-yargs-boilerplate

Simple Yargs boilerplate to create a CLI (command line interface)
JavaScript
8
star
45

mongodb-backup-docker

MongoDB Backup Docker
Shell
8
star
46

debug-mongoose-aggregate

Simple aggregate debugger for mongoose
JavaScript
8
star
47

woovi-backend-graphql

Woovi GraphQL Backend Server Example
TypeScript
7
star
48

n8n-nodes-woovi

Automated workflow on N8N + Woovi
TypeScript
7
star
49

swaggerGraphQLMocked

Mock a swagger json using GraphQL
JavaScript
7
star
50

eslint-config-entria

Eslint config to be shared on entria projects
6
star
51

react-native-datami

Objective-C++
4
star
52

fantasyland

Everything we're talking, searching and discussing about fantasyland specs.
4
star
53

redis-flush-all-forever

Connects to a redis server and issue FLUSHALL command
JavaScript
2
star
54

docker-thumbor

https://hub.docker.com/r/feedbackhouse/thumbor
Smarty
1
star
55

circleci-automation

cli tool to cancel redundants builds
JavaScript
1
star
56

bugs-omie

Melhorias e Bugs da Plataforma Omie
1
star