title: Laravel Lighthouse GraphQL renamed relationship mutation
body: <p>I'm having an issue updating a renamed relationship with a graphQL query.</p>
  
  <p>Here's the related schema and Laravel models:</p>
  
  <p><strong>Laravel Models</strong>
  </p>
  
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\Relations\BelongsTo;
  use Illuminate\Database\Eloquent\Relations\BelongsToMany;
  
  class Lead extends Model
  {
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      // protected $fillable = [
      //     'lead_type_id',
      // ];
  
      protected $guarded = [];
      /**
       * The attributes that should be hidden for arrays.
       *
       * @var array
       */
      protected $hidden = [
          //
      ];
  
      /**
       * The attributes that should be cast to native types.
       *
       * @var array
       */
      protected $casts = [
          // 'created_at' =&gt; 'timestamp',
          // 'updated_at' =&gt; 'timestamp'
      ];
  
      /**
       * Get the LeadActions for the Lead.
       */
      public function leadActions()
      {
          return $this-&gt;hasMany(\App\Models\LeadAction::class);
      }
  
      /**
       * Get the clients for the Lead.
       */
      public function clients(): BelongsToMany
      {
          return $this-&gt;belongsToMany(Client::class);
      }
  
      /**
       * Get the LeadType for the Lead.
       */
      public function leadType(): BelongsTo
      {
          return $this-&gt;belongsTo(\App\Models\LeadType::class, 'lead_type_id');
      }
  }
  
  ?&gt;
  
  &lt;?php
  
  namespace App\Models;
  
  use App\Models;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\Relations\HasMany;
  
  class LeadType extends Model
  {
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [
          'name'
      ];
  
      /**
       * The attributes that should be hidden for arrays.
       *
       * @var array
       */
      protected $hidden = [
          //
      ];
  
      /**
       * The attributes that should be cast to native types.
       *
       * @var array
       */
      protected $casts = [
          'name' =&gt; 'string',
          'created_at' =&gt; 'timestamp',
          'updated_at' =&gt; 'timestamp'
      ];
  
      /**
       * Get the Leads for the LeadType.
       */
      public function leads(): HasMany
      {
          return $this-&gt;hasMany(Models\Lead::class);
      }
  
  }
  ?&gt;
  
  </code></pre>
  
  <p><strong>GraphQl Schema</strong>
  </p>
  
  <pre><code>type Lead {
     id: ID!
     lead_type: LeadType @belongsTo(relation: "leadType")
     clients: [Client!]! @belongsToMany
     created_at: DateTime!
     updated_at: DateTime!
  }
  input UpdateLeadInput {
     id: ID!
     clients: UpdateClientsRelation
     lead_type: UpdateLeadTypeRelation
  }
  input UpdateLeadTypeRelation {
     create: CreateLeadTypeInput
     connect: ID
     update: UpdateLeadTypeInput
     upsert: UpsertLeadTypeInput
     delete: ID
     disconnect: ID
  }
  </code></pre>
  
  <p>Using the following graphQl query I get an SQL error for missing column lead_type:
  <strong>Query</strong>
  </p>
  
  <pre><code>mutation UpdateLead {
    updateLead(input: {id: 1, lead_type: {connect: 1}}) {
      id
      clients {
        id
        name
      }
      lead_type {
        id
        name
      }
    }
  }
  </code></pre>
  
  <p><strong>SQL Error</strong></p>
  
  <pre><code>Column not found: 1054 Unknown column 'lead_type' in 'field list' (SQL: update `leads` set `lead_type` = {\"connect\":\"1\"}, `leads`.`updated_at` = 2020-01-14 17:11:17 where `id` = 1
  </code></pre>
  
  <p>I've followed the Laravel naming convention, and named the column lead_type_id on the leads table. If I remove the renaming of the lead_type relationship to leadType I can successfully run an update mutation, but I can't figure out how to get it to use the correct name for the column (lead_type_id) whilst keeping the relationship renamed.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Many Thanks</p>