DEV Community

Discussion on: Three in one (code first) : NestJs & GraphQl & Mongoose

Collapse
 
smolinari profile image
Scott Molinari

Nice article. I'd like to throw in another possible set of bricks for getting NestJS and Mongoose working. It's called Typegoose.

typegoose.github.io/typegoose/
(and corresponding NestJS Module for it: kpfromer.github.io/nestjs-typegoose/

Be aware though, using Mongoose with TypeScript is an adventure. They just moved their types to their own a few months ago and they are about 97% ok. But, there might be 3% where you'll be scratching your head. The Typegoose maintainer though works hard to work with the Mongoose team to get these type issues resolved and the upcoming 8.0 of Typegoose is shaping up to be pretty cool.

Hopefully, one day, we'll have a Mongoose written in TypeScript. Crossing my fingers!

Scott

Collapse
 
lotfi profile image
Lotfi

Interesting, I will check Typegoose, I didn't know it. Thank you for your comment.