To test the application, please click on the following link to view all the queries.
Queries | Link |
---|---|
Create User Mutation | Link |
Login User Mutation | Link |
Get User Query | Link |
Create Product Mutation | Link |
Get Product Query | Link |
Get Products Query | Link |
Run the following commands
mkdir gql-api
cd gql-api
echo "node_modules\n.DS_Store\n.env" > .gitignore
git init
npm init -y
npm install -g typescript
tsc --init -y
npm i --save type-graphql apollo-server graphql@15.x reflect-metadata @typegoose/typegoose mongoose class-validator bcrypt jsonwebtoken cookie-parser config dotenv
npm install --save-dev @types/express @types/node @types/cors @types/jsonwebtoken @types/lodash pino-pretty @types/cookie-parser ts-node-dev typescript
Change to the project's root directory and execute the following bash command
mkdir certs && cd certs && openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:4096 && openssl rsa -in private_key.pem -pubout -out public_key.pem