🖐 Hi there, I've built a node.js + express.js + MongoDB GraphQL along with JWT authentication. Here I've taken book-database as an example for making CRUD operations via GraphQL queries with JWT authentication. Please go through the screenshots to know more about endpoints. Feel free to use this code and work around it. Hope you got the insights!
- bcryptjs - Password hashing
- jsonwebtoken - for generating JWT
- express-validator - Input validation
- mongodb - mongodb cluster
- mongoose - ODM
- express - node.js framework
- express-graphql & graphql - for defining schema and resolvers
http://localhost:3000/graphql
- Well, first clone or download this repo.
- Create a cluster in mongodb Atlas, and then create a collection, and get your access URL to your cluster's database and paste it in app.js for MONGODBURL variable.
- Run "npm install" to install dependent packages for the app.
- Create a document with email and password(bcrypt hashed) in user collection for you to authenticate yourselves.
- Now, you're ready to go!
Please give me a star⭐ to this repo, I'll be happy😊.





