title: Lighthouse eager loading relations
body: <p>I have been trying to migrate my old API into GraphQl and i am trying to eager load just once but with graphql lighthouse i couldnt find properway</p>
  
  <p>my model</p>
  
  <pre><code>public function getMeta($name, $defaultValue = null)
  {
      if (!$this-&gt;relationLoaded('metas')) {
          return $defaultValue;
      }
  
      return $this-&gt;metas-&gt;where('name', $name)-&gt;first()-&gt;value ?? $defaultValue;
  }
  </code></pre>
  
  <p>previously i have been using laravel jsonResources</p>
  
  <pre><code>'built_year' =&gt; $this-&gt;getMeta('built_year'),
              'floors' =&gt; $this-&gt;getMeta('floors'),
              'cabins' =&gt; $this-&gt;getMeta('cabins'),
  </code></pre>
  
  <p>Using this there is one one request made for metas table </p>
  
  <p>but now using graphql it is making each db req with each <code>$this-&gt;getMeta</code> call
  my schema</p>
  
  <pre><code>type Cruise{
  built_year : GetMeta @field(resolver:"App\\GraphQL\\Types\\GetMetaTypes@get")
      floors : GetMeta @field(resolver:"App\\GraphQL\\Types\\GetMetaTypes@get")
      cabins : GetMeta @field(resolver:"App\\GraphQL\\Types\\GetMetaTypes@get")
  }
  
  type GetMeta{
      value : String
  }
  </code></pre>
  
  <p>Custom type</p>
  
  <pre><code>public function get($cruise,$next,$a,$b)
      {
          $cruise-&gt;load("metas");
          return ['value' =&gt; $cruise-&gt;getMeta($b-&gt;fieldName) ];
      }
  </code></pre>