title: How to create multilevel nested queries in nestjs/graphql using @ResolveField?
body: <h2>Hello. I can't figure out how to create multiple levels of nested queries with @ResolveFiled. I hope for your help. </h2>
  <p>What I'm doing and Context:</p>
  <p>I have a product. The product has a supplier. A vendor-specific product contains product variants. Variants contain options.</p>
  <p>I need to make a request in 4 levels:</p>
  <ol>
  <li>Product</li>
  <li>ProductHasProvider</li>
  <li>Product Variants</li>
  <li>Variant Options</li>
  </ol>
  <p>I use the &quot;Code First&quot; approach, created an ObjectType for each entity. Next, I create a &quot;Product&quot; resolver.</p>
  <p>Creating a second level &quot;ProductHasProvider&quot; with @ResolveField</p>
  <p>When adding a ResolveField (&quot;Providers&quot;) - it appears inside the main resolver &quot;Product&quot; and resolves the Providers ObjectType. Okay, it works, I can make requests at the 2nd level correctly.</p>
  <pre><code>
   @ResolveField('Providers', () =&gt; [ProductHasProvider])
              async getProductProviders (@Parent() product: Product) {
                  const { id } = product;
                  return await this.productListService.ProductsProviders( { id });
                  }
  </code></pre>
  <ol start="2">
  <li>I want to make third level where ProductHasProvider has Variants. I decorate ProductHasProvider as the parent.</li>
  </ol>
  <pre><code>@ResolveField(('variants'), type =&gt; [Variant])
              async getVariants (@Parent() productHasProvider: ProductHasProvider) {
                  const { id } = productHasProvider;
                  return await this.productListService.getVariants({ id });
              }
  
  
  </code></pre>
  <p>In this case, this ResolveField defines the ObjectType for [Variants], but for some reason at the first level. That is, in Apollo studio, the field is displayed in &quot;Product&quot;. I can't query Variants for ProductHasProvider.</p>
  <pre><code>
      query Products {
        getProducts {
          Providers {
            id
          }
          variants {
            id
            options {
              id
            }
          }
        }
      }
  
  </code></pre>
  <p>Expected behavior:</p>
  <p>I add a new @ResolveField(() =&gt; [Variants]) with &quot;ProductHasProvider&quot; parent (Which is already @ResorveField for Product). And I can do 3rd and 4th level queries.</p>
  <pre><code>
      query Products {
    getProducts {
      id
      Providers {
        id
        variants {
          id
          options {
            id
          }
        }
      }
    }
  }
  
  </code></pre>
  <p>Please tell me what I'm doing wrong and how to achieve what I want. Thank you.</p>