'Spring not rendering nested object while using HAL+JSON

I'm currently using the default Spring REST HAL+JSON since my repositories extend JpaRepository, but I'd like a deeper object graph to be rendered without having to perform multiple http requests.

I not only want to do a GET and have the deep graph/nested object details, but I also want to HTTP POST and create the nested objects along with the parent in a single request. I'm assuming what I'm asking for is anti-HATEOAS? I'm open to different ideas:

  1. Is there an easy way to flip a switch and stop using HAL across the board?
  2. Is it time to consider using GraphQL? (one of the best practices?)
  3. Some other way?

thx



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source