Im posting this here since i spent half a day finding this bug.
When using GQL Code First approach + MongoDB Schemas in the same file you can run into an issue where the project cant compile as soon as you define a type from mongoose like this:
import { Types, Document } from 'mongoose';
export class User {
_id: Types.ObjectId;
What causes the compiler to try to import mongoose from '../../../../../mongoose?