Add originalBody parameter to update note api
When we are updating the note via the API, we don't have any way to prevent data lose. In this issue, we introduce a new optional parameter called original_body, which is used to check the note has not been updated since the client sending the api request has last seen the note.
Steps to reproduce
- Read the note as user A, user A thinks that
body
is1234
- Read the note as user B, user B thinks that
body
is1234
- User A submits a
updateNote
mutation and changes the body toabcde
- User B submits an
updateNote
changes the body towxyz
**without having a chance of knowing they are overriding data they've never seen.
Related to: #323808