Q:

What's the best way to implement update deeply nested JSON structure with Spring Data REST?

I have many related resources with exported repositories on the backend (Spring Data REST).
My client loads "root" resource with GET and then lazy-loads related resources through "_links" properties.
Then client can modify some resources in the loaded graph.
I want to implement service, which will take json with all lazy-loaded resources and update modified resources with version-checking (optimistic) at once.
What's the best way to implement this?
Is this approach a bad practice?

A:

Sounds as a good place for graphql.com
It allows to get all of the data you need, in one request. You can define API and call queries requesting only necessary part of data.
It supports customized updates as well.

