title: complete object in .save() ParseSwift response
body: <p>Is there a way how to control what fields are returned (or to return the complete object state) in the Parse server response when calling save in ParseSwift SDK?</p>
  <p>When I use following function:</p>
  <pre><code>var prsUser = PrsUser()
  prsUser.setData(from: user, syncData: syncData)
  print(&quot;prsUser before save: \(prsUser)&quot;)
  prsUser.save { result in
      switch result {
      case .success(let user):
           print(&quot;prsUser saved: \(String(describing: user))&quot;)
           success(true)
      case .failure(let error):
           print(&quot;Error saving: \(error)&quot;)
           success(false)
      }
  }
  </code></pre>
  <p>I can see in console the print statement before save and as a response of the save:</p>
  <blockquote>
  <p>prsUser before save: _User
  ({&quot;createdAt&quot;:{&quot;__type&quot;:&quot;Date&quot;,&quot;iso&quot;:&quot;2021-05-07T17:54:59.267Z&quot;},&quot;maxD&quot;:61,&quot;objectId&quot;:&quot;cLAdfV25wz&quot;})</p>
  </blockquote>
  <blockquote>
  <p>prsUser saved: _User
  ({&quot;objectId&quot;:&quot;cLAdfV25wz&quot;,&quot;updatedAt&quot;:{&quot;__type&quot;:&quot;Date&quot;,&quot;iso&quot;:&quot;2021-05-08T13:57:35.950Z&quot;},&quot;maxD&quot;:61,&quot;createdAt&quot;:{&quot;__type&quot;:&quot;Date&quot;,&quot;iso&quot;:&quot;2021-05-07T17:54:59.267Z&quot;}})</p>
  </blockquote>
  <p>but in this simple case I have a two little issues:</p>
  <ol>
  <li><p>in the cloud code I try to revert the value for certain fields and in this case the maxD was reverted in beforeSave trigger, as I can also confirm it being unchanged in the Parse Dashboard</p>
  <p>request.object.set(&quot;maxD&quot;, request.original.get(&quot;maxD&quot;));</p>
  </li>
  <li><p>there are other fields in the prsUser objects the were not modified, but I would expect them to show up in the response. In the Parse Dashboard console I can see in the log following:</p>
  </li>
  </ol>
  <blockquote>
  <p>Input:
  {&quot;email&quot;:&quot;aa@aa.aa&quot;,&quot;username&quot;:&quot;aa@aa.aa&quot;,&quot;emailVerified&quot;:false,&quot;createdAt&quot;:&quot;2021-05-07T17:54:59.267Z&quot;,&quot;updatedAt&quot;:&quot;2021-05-08T13:57:35.950Z&quot;,&quot;gch&quot;:1,&quot;minA&quot;:25,&quot;sof&quot;:true,&quot;maxD&quot;:87,&quot;maxA&quot;:36,&quot;updates&quot;:{&quot;gch&quot;:&quot;2021-05-7T12:00:00.000Z&quot;,&quot;minA&quot;:&quot;2021-05-7T12:00:00.000Z&quot;,&quot;maxA&quot;:&quot;2021-05-7T12:00:00.000Z&quot;},&quot;ACL&quot;:{&quot;cLAdfV25wz&quot;:{&quot;read&quot;:true,&quot;write&quot;:true}},&quot;objectId&quot;:&quot;cLAdfV25wz&quot;}</p>
  <p>Result: {&quot;object&quot;:{&quot;maxD&quot;:87}}</p>
  </blockquote>
  <p>When I log more info before and after the revert with the following code, I can clearly see the the only dirtyKey is maxD and also that it is being reverted from requested value back to original (in this case 87):</p>
  <pre><code>const dirtyKeys = request.object.dirtyKeys();
  request.log.info(`request.object before revert ${JSON.stringify(request.object)}, dirtyKeys: ${dirtyKeys}`);
  request.object.set(&quot;maxD&quot;, request.original.get(&quot;maxD&quot;));
  request.log.info(`request.object after revert ${JSON.stringify(request.object)}`);
  </code></pre>
  <p>But then I am confused again, why do I receive the response as above with saved value of 61.</p>
  <p>Therefore my questions would be:</p>
  <ol>
  <li>is there a way how to get the actual object state with all fields in the response? It seems that the Parse Server does read the object from database before updating and saving values and therefore could theoretically send back the whole object.</li>
  <li>or do I understand it wrong and the Parse Server is not passing back more than &quot;success&quot; mark? With that case there would not be any way how to tell, what values were actually saved without extra fetch call?</li>
  </ol>