Let say user modifies name only. I want to send student data with name only in this case to the server i.e., partial update. I am not using Ember-data. how to achieve this.
If you’re not using Ember-Data, then how you do it is completely up to you. You’re writing the server and client code, so you can do anything you want. However, a good starting point for the API is the JSON API. Here’s how they do PATCH updates.
JSON API is helpful to design API. My question is how to find the diff to decide what are the data changed so that i can send PATCH request with modified data.
I don’t understand what you’re asking then. You’ve not using Ember-Data (or likely any of its alternatives), which means that you must have designed your own ad-hoc object model for persistence. Why are you asking us how to work with your object model?
does anyone know of a method that is similar to changedAttributes for relationships. For a PATCH request I am updating a single attribute, and don’t want to send the rest of the attributes or the relationships to the server. In fact if they’ve updated I’d rather they become the source of truth so I really don’t want to send them. Is there an Ember Data way of doing this?