title: Undefined type error. Make sure you are providing an explicit type for the "ClassName" (parameter at index [0]) of the class
body: <p>I'm creating an input type for nestJs graphQL mutation. After providing the Input type to my mutation argument I'm getting this error</p>
  <p><a href="https://i.stack.imgur.com/IaiYi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IaiYi.png" alt="enter image description here" /></a></p>
  <p><strong>Input Type</strong></p>
  <pre><code>import { Field, InputType } from '@nestjs/graphql';
  import { IsDate, IsNotEmpty, IsString } from 'class-validator';
  
  @InputType()
  export class MasterManagementCreateInput {
    @IsString()
    @IsNotEmpty()
    @Field(() =&gt; String)
    masterNumber: string;
  
    @IsString()
    @IsNotEmpty()
    @Field(() =&gt; String)
    flightNumber: string;
  
    @IsString()
    @IsNotEmpty()
    @Field(() =&gt; String)
    departureAirPort: string;
  
    @IsString()
    @IsNotEmpty()
    @Field(() =&gt; String)
    arrivalAirPort: string;
  
    @IsDate()
    @Field(() =&gt; Date, { nullable: true })
    DepartureTime: Date;
  
    @IsDate()
    @Field(() =&gt; Date, { nullable: true })
    arrivalTime: Date;
  
    @IsString()
    @IsNotEmpty()
    @Field(() =&gt; String)
    deliveryStatus: string;
  }
  </code></pre>
  <p><strong>Resolver</strong></p>
  <pre><code>import { Args, Query, Resolver, Mutation } from '@nestjs/graphql';
  import { MasterManagement } from './entities';
  import { MasterManagementService } from './master-management.service';
  import { FindById } from '../dtos';
  import { MasterManagementUpdateInput, MasterManagementCreateInput } from './dto';
  
  @Resolver(() =&gt; MasterManagement)
  export class MasterManagementResolver {
    constructor(
      private readonly masterManagementService: MasterManagementService,
    ) {}
  
    @Query(() =&gt; [MasterManagement])
    async allMasterManagement() {
      return await this.masterManagementService.getAll();
    }
  
    @Query(() =&gt; MasterManagement)
    async masterManagementById(@Args('id') id: FindById) {
      return await this.masterManagementService.getById({ id });
    }
  
    @Mutation(() =&gt; MasterManagement)
    async createMasterManagement(
      @Args('createInput')
      input: MasterManagementCreateInput,
    ) {
      return await this.masterManagementService.create(input);
    }
  
    @Mutation(() =&gt; MasterManagement)
    async updateMasterManagement(
      @Args('updateInput') input: MasterManagementUpdateInput,
    ) {
      const { id } = input;
      delete input.id;
      return await this.masterManagementService.update(input, { id });
    }
  }
  
  </code></pre>
  <p>I don't know why this error is ocurring. I already used the same logic in my other resolvers and it is working fine. The itresting part is if I use an <strong>@InputType</strong>  from other resolvers in this resolver it works fine.</p>