- nexus
- prisma2
- apollo-server
- apollo-client (with create-react-app)
- setup mysql and create database
- setup env file
- copy
.env.sample
to.env
- configuration
.env
file
- copy
- export env file variables
$ set -a && source .env && set +a
- yarn install
$ yarn
- migration database
$ yarn prisma migrate up --experimental
- generate ORM, graphql schema codes
$ yarn generate
- launch graphql server and front-end dev server
$ yarn dev
- prisma sql playground
$ yarn prisma-playground yarn run v1.22.4 $ ts-node -P tsconfig-graphql-server.json -O '{ "isolatedModules": false }' > import { prisma } from './src/graphql-server/prisma_client' {} > prisma.test_table.findMany().then(data => console.log(data)) Promise { <pending> } > SQL(11ms) SELECT `db`.`test_table`.`id`, `db`.`test_table`.`name` FROM `db`.`test_table` WHERE 1=1 []