title: How to make Update Mutation - GraphQL (plus mongoDB)
body: <p>I would like to do an update mutation to albums, but I'm having issues getting the update and getting the return value. </p>
  
  <p>Schema Mongoose:</p>
  
  <pre><code>var AlbumSchema = new Schema({
      name: String,
      dateCreated: { type: Date, default: Date.now },
      dateUpdated: { type: Date, default: Date.now }
  });
  </code></pre>
  
  <p>GraphQL Type:</p>
  
  <pre><code>    const AlbumType = new GraphQLObjectType({
          name: 'Album',
          fields: () =&gt; ({
              id: {type:GraphQLID},
              name: {type:GraphQLString},
              dateCreated: {type: GraphQLString},
              dateUpdated: {type: GraphQLString}
          })
      })
  </code></pre>
  
  <p>Update Mutation:</p>
  
  <pre><code>updateAlbum: { //STILL TRYING TO GET TO WORK
              type: AlbumType,
              args: {
                  id: {type: new GraphQLNonNull(GraphQLString)},
                  name: {type: new GraphQLNonNull(GraphQLString)}
              },
              resolve(parentValue, args){
                  return new Promise((resolve, reject) =&gt; {
                      ALBUM.findOneAndUpdate(
                          {id: args.id},
                          {name: args.name},
                          //{dateUpdated:  Date.now()}
                      ).exec((err, res) =&gt; {
                          if(err) reject(err)
                          else resolve()
                      })
                  })
              }
          }
  </code></pre>
  
  <p>Test Mutation: </p>
  
  <pre><code>mutation {
    updateAlbum(id:"5a695c586c050802f182270c", name: "album 333"){
      id
     name }}
  </code></pre>
  
  <p>Test Mutation's Response:</p>
  
  <pre><code>{
    "data": {
      "updateAlbum": null
    }
  }
  </code></pre>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li><p>How should I write the <code>updateAlbum</code> function?</p></li>
  <li><p>(less important) How do I add the <code>Date.now()</code> to get a new <code>dateUpdated:</code> value?</p></li>
  <li><p>How do I get the return value or what ever it is that I can get a response that isn't <code>updateAlbum: null</code>? Thank you!</p></li>
  </ol>