title: Provide explicit type for the mutation GraphQL
body: <p>I'm trying to create a mutation which will accept list of products. But doing so GraphQL is throwing error for <strong>createMultipleProducts</strong> method. Not sure what is the mistake here.</p>
  <pre><code>import { Inject } from &quot;@nestjs/common&quot;;
  import { Args, Mutation, Query, Resolver } from &quot;@nestjs/graphql&quot;;
  import { ClientProxy } from &quot;@nestjs/microservices&quot;;
  import { ProductRequest } from &quot;src/types/ms-product/product.request.type&quot;;
  import { ProductResponse } from &quot;src/types/ms-product/product.response.type&quot;;
  @Resolver(of =&gt; ProductResponse)
  export class ProductResolver {
  
    constructor(
      @Inject('SERVICE__PRODUCT') private readonly clientServiceProduct: ClientProxy
    ) {}
  
    @Mutation(returns =&gt; ProductResponse)
    async createProduct(@Args('data') product: ProductRequest): Promise&lt;ProductResponse&gt; {
      const PATTERN = {cmd: 'ms-product-create'};
      const PAYLOAD = product;
      return this.clientServiceProduct.send(PATTERN, PAYLOAD)
      .toPromise()
      .then((response: ProductResponse) =&gt; {
        return response;
      })
      .catch((error) =&gt; {
        return error;
      })
    }
  
    @Mutation(returns =&gt; [ProductResponse])
    async createMultipleProducts(@Args('data') products: [ProductRequest]): Promise&lt;Array&lt;ProductResponse&gt;&gt; {
      try {
        const PROMISES = products.map(async (product: ProductRequest) =&gt; {
          const PATTERN = {cmd: 'ms-product-create'};
          const PAYLOAD = product;
          return await this.clientServiceProduct.send(PATTERN, PAYLOAD).toPromise();
        });
    
        return await Promise.all(PROMISES);
      } catch (error) {
        throw new Error(error);
      }
    }
  
    @Query(returns =&gt; ProductResponse)
    async readProduct(@Args('data') id: string) {
      return {}
    }
  }
  </code></pre>
  <p>I'm getting this error:</p>
  <pre><code>UnhandledPromiseRejectionWarning: Error: Undefined type error. Make sure you are providing an explicit type for the &quot;createMultipleProducts&quot; (parameter at index [0]) of the &quot;ProductResolver&quot; class.
  </code></pre>