Boilerplate for graphql and graphql-ws using Apollo Server Express and powered by TypeORM and TypeGraphQL to make your work is quicker and easier.
Made with 💕 by Arya W Pratama
I hope you like it! 😉
Powered by
- Basic JWT Login and Register System.
- Role Based Access Control Guard.
- GraphQL WebSocket with graphql-ws.
- Database Faker with Faker and TypeORM Seeding.
- graphql-ws, client example in graphqlwsclient branch.
- Path Alias.
- TypeGraphQL.
- Typescript. ❤️
- Build helper, to make your build folder clean.
- ESLint Airbnb.
- Rename
.env.example
to.env
- Fill the
.env
with your own configuration - Run
yarn
ornpm install
to install the dependencies - Run
yarn seed
ornpm run seed
to seed your database - Finally run
yarn dev
ornpm run dev
to start the server in Development Mode
yarn build
ornpm run build
- Build your project, the output will be in
/dist
directory
- Build your project, the output will be in
yarn dev
ornpm run dev
- Start your server in Develompent Mode
yarn staging
ornpm run staging
- Start your server in Develompent in Staging Mode Make sure you build your project first
yarn production
ornpm run production
- Start your server in Develompent in Production Mode Make sure you build your project first
yarn seed
ornpm run seed
- Seed your database
yarn schema:sync
ornpm run schema:sync
- Sync your entities with your database
yarn schema:drop
ornpm run schema:drop
- Drop all of your table in your database
yarn migration:run
ornpm run migration:run
- Migrating Database
yarn migration:revert
ornpm run migration:revert
- Revert database Migration
yarn database:refresh
ornpm run database:refresh
- Refresh your database with new table and data
- Admin
- username : [email protected]
- password : admin
- Organizer
- username : [email protected]
- password : organizer
- User
- username : [email protected]
- password : user
- You may use another database like oracledb, mariadb, postgresql, etc. Just remove the
mysql
dependency and install your own database dependency as long as typeorm support it. - I have installed graphql-ws to make your work easier, just disable it if you don't want graphql subscription run in your project.
- I use id_ID for default user faker data, just change the locale in
@factories/dummyUser.factory.ts
directory. - I've setup path alias in this project, you may found and edit it by your own decision in
tsconfig.json
- I'm not an expert so I might make a lot of mistake, I just want to make your work is easier. Your feedback would make me be a better developer! ❤️