- Clone this repo and install packages using npm
npm install
or yarnyarn
- Run database migration using
yarn db:migrate
ornpm run db:migrate
- Run database seeder using
yarn db:seed
ornpm run db:seed
- Start the graphql server
yarn dev
ornpm run dev
Note: If server doesn't restart automatically after changing any file terminate existing process and run yarn dev
or npm run start
again.
- We are using
Prisma
as our orm it's pretty easy to use check this documentation for basic crud operations. - We are using
code-first
approach for Graphql usingnexus
library check this documentation for more information - Database schema is located at
/prisma/schema.prisma
- Create mutation to create post
- Create mutation to update post
- Create mutation to delete post
After completing challenge you have to submit this to us there are few ways to do that select whichever is easier to you.
- Fork this repo and create a pull request
- Create your own public repo and upload the code
Final Step : Send email to [email protected]
with title YourName - NodeJS Graphql Challenge
and it should contain link to pull request
or your repo