title: Omitted optional input set to null instead of undefined
body: <p>So a year or so ago, an update was made on <code>apollo-server</code> (or <code>react-apollo</code> ?) which completely broke the old use of omitted nullable inputs in GraphQL requests.</p>
  
  <p>Prior to the update, you could define something like :</p>
  
  <pre><code>Mutation {
    editProfile(id: ID!, name: String, avatar: String)
  }
  </code></pre>
  
  <p>And when calling it client-side with omitted inputs, say :</p>
  
  <pre><code>editProfile(id: "whateverid", name: "James")
  </code></pre>
  
  <p>you got <code>avatar</code> as <code>undefined</code> in your resolver.
  <strong>Now it's set to <code>null</code>.</strong></p>
  
  <p>The problem is : <code>null</code> is a perfectly valid value for some optional inputs, for instance <code>avatar</code>. So basically, we've lost an information in the process and are no longer able to tell the difference server-side between :</p>
  
  <ul>
  <li>A optional input which was omitted and appears <code>null</code> (= do <strong>not</strong> update the database), and</li>
  <li>A optional input that was explicitly set to <code>null</code> (= update the database)</li>
  </ul>
  
  <p>I opened a thread on Github about it here : <a href="https://github.com/apollographql/apollo-server/issues/2056" rel="nofollow noreferrer">https://github.com/apollographql/apollo-server/issues/2056</a></p>
  
  <p>Another guy did the same a year ago on <code>react-apollo</code>'s Github : <a href="https://github.com/apollographql/react-apollo/issues/1569" rel="nofollow noreferrer">https://github.com/apollographql/react-apollo/issues/1569</a></p>
  
  <p>dacz posted <a href="https://github.com/apollographql/react-apollo/issues/1569#issuecomment-359725254" rel="nofollow noreferrer">an interesting response</a> that sums it up quite well :</p>
  
  <blockquote>
    <p>Nullable input when not presented within the query variables in apollo client, is getting called with null value.
      Client should not pass the whole input as null, it should omit it completely or pass it with undefined. Passing null may mean explicitly null the input. Same applied to input fields, so the server may react on explicitly resetting the value (presented in the input with null or do not handle it if omitted).</p>
  </blockquote>
  
  <p>Both threads still remain unsolved.</p>
  
  <p>Does someone have any clean solution to this ?</p>