title: AWS GraphQL: Variable 'input' has coerced Null value for NonNull type 'Input!'
body: <p>I'm using ReactJS and <code>aws-amplify</code> to execute graphql operations.</p>
  
  <p><strong>CODE:</strong></p>
  
  <pre><code>import {
     API,
     graphqlOperation
  } from 'aws-amplify';
  
  import { UpdateInput } from './mutations.js';
  
  // Call mutation
  const input = { /* some values */ };
  API.graphql(graphqlOperation(UpdateInput, input)).then(...);
  </code></pre>
  
  <p>GraphQL mutation definition:</p>
  
  <pre><code>export const UpdateInput = `mutation UpdateInput($input: Input!) {
     updateInput(input: $input) {
        id, 
        name
     }   
  }`
  </code></pre>
  
  <p>GraphQL Schema:</p>
  
  <pre><code>input Input {
     id: ID!
     name: String
  }
  
  type Mutation {
     updateInput(input: Input!): String
  }
  </code></pre>
  
  <p>However, I get an error:</p>
  
  <blockquote>
    <p>[Log] Variable 'input' has coerced Null value for NonNull type
    'Input!'</p>
  </blockquote>
  
  <p>Using AWS console my mutation works and <code>input</code> is NonNull (using a debugger)</p>
  
  <p>Any ideas what's causing the error?</p>