DEV Community

loading...

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

Collapse
jbool24 profile image
Justin Bellero

Anyone using this technique of overlaying Graphql/Mongoose models using the mongoose discriminators shcema type? I'd like to have one "users" collection that discriminates document data base on the user kind. Is it even possible to get that working? Am I trying to create a nightmare for myself?

I'm testing things out now but having issues with graphql resolution since the gql schema needs to implement union types (I think). I might be going about it wrong. Any suggestions?

Forem Open with the Forem app