title: NestJS + Mongoose + GraphQL : "populate" not working
body: <p>thanks for the great framework!</p>
  
  <p>I use mongoose with GraphQL and have the following problem:</p>
  
  <p>If I want to resolve the ObjectIDs stored in the array "arguments" of a user with <code>populate</code>, in GraphQL I get the user with an empty arguments array as answer.</p>
  
  <p>I suspect the error when defining the reference <code>ArgumentSchema</code> (name of the MongoDB schema) or the populate <code>arguments</code> (name of the attributes of the user). How does this work correctly?</p>
  
  <p><strong>argument.schema</strong></p>
  
  <pre><code>export const ArgumentSchema = new mongoose.Schema({
    argument: { type: String, required: true },
    userId: { type: String, required: true },
    username: { type: String, required: true },
  });
  </code></pre>
  
  <p><strong>user.schema</strong></p>
  
  <pre><code>export const UserSchema = new mongoose.Schema({
    username: { type: String, required: true },
    email: { type: String, required: true },
    age: { type: Number, required: true },
    arguments: { type: [mongoose.Schema.Types.ObjectId], required: false, ref: 'ArgumentSchema' },
  });
  </code></pre>
  
  <p><strong>argument.model</strong></p>
  
  <pre><code>@ObjectType()
  export class ArgumentGQL {
    @Field(() =&gt; ID)
    readonly _id: string;
  
    @Field()
    readonly argument: string;
  
    @Field()
    readonly userId: string;
  
    @Field()
    readonly username: string;
  }
  </code></pre>
  
  <p><strong>user.model</strong></p>
  
  <pre><code>@ObjectType()
  export class UserGQL {
    @Field(() =&gt; ID)
    readonly _id: string;
  
    @Field()
    readonly username: string;
  
    @Field()
    readonly email: string;
  
    @Field()
    readonly age: number;
  
    @Field(() =&gt; [ArgumentGQL], { nullable: true })
    readonly arguments: ArgumentGQL[];
  }
  </code></pre>
  
  <p><strong>user.service</strong></p>
  
  <pre><code>async getOne(id: string): Promise&lt;UserGQL&gt; {
      try {
        return await this.userModel.findById(id).populate('arguments').exec();
      } catch (e) {
        throw new BadRequestException(e);
      }
    }
  </code></pre>
  
  <p><strong>GraphlQL Query example</strong></p>
  
  <pre><code>query {
    getUser(id: "5dbcaf9f5ba1eb2de93a9301") {
        _id,
        username,
        email,
        age,
        arguments {
            argument,
            username
        }
    }
  }
  </code></pre>
  
  <p>I think I haven't understood something fundamental yet...</p>
  
  <p>I would be grateful for any help!
  Cheers</p>