Hello. I do (try to) SPA REST API. I have a Post entity that is associated with the Comment entity (one to many), and the Comment entity associated with the entity Comment_Likes (one to many):
I am worried about - when I do a Get request on the url site.com/posts,
can I return this answer, inside which will contain all relations at once? -
"title": "First post",
"content": "Content of first post",
"content": "First comment",
It is REST or not REST? And if you don't REST, then how to make it more like him? I read that suezanne model should be returned in the form of links to the resources. But it turns out that instead of having to make one http request I have to make hundreds of queries to my service more like Restful?