title: How do I insert an optional field as null using AppSync Resolvers and Aurora?
body: <p>I have an optional String field, <em>notes</em>, that is sometimes empty. If it's empty I want to insert <em>null</em>, otherwise I want to insert the string.</p>
  
  <p>Here is my resolver - </p>
  
  <pre><code>{
      "version" : "2017-02-28",
      "operation": "Invoke",
          #set($id = $util.autoId())
          #set($notes = $util.defaultIfNullOrEmpty($context.arguments.notes, 'null'))
  
          "payload": {
            "sql":"INSERT INTO things VALUES ('$id', :NOTES)",
            "variableMapping": {
              ":NOTES" : $notes
            },
            "responseSQL": "SELECT * FROM things WHERE id = '$id'"
          }
  </code></pre>
  
  <p>} </p>
  
  <p>With this graphql</p>
  
  <pre><code>mutation CreateThing{
    createThing() {
      id
      notes
    }
  }
  </code></pre>
  
  <p>I get -</p>
  
  <pre><code>{
    "data": {
      "createRoll": {
        "id": "6af68989-0bdc-44e2-8558-aeb4c8418e93",
       "notes": "null"
     }
   }
  </code></pre>
  
  <p>}</p>
  
  <p>when I really want <em>null</em> without the quotes.</p>
  
  <p>And with this graphql - </p>
  
  <pre><code>mutation CreateThing{
    createThing(notes: "Here are some notes") {
      id
      notes
    }
  }
  </code></pre>
  
  <p>I get -</p>
  
  <pre><code>{
    "data": {
      "createThing": {
        "id": "6af68989-0bdc-44e2-8558-aeb4c8418e93",
        "notes": "Here are some notes"
      }
    }
  }
  </code></pre>
  
  <p>which is what I want.</p>
  
  <p>How do I get a quoteless null and a quoted string into the same field?</p>