Fetching entities with complex relationships can consume a lot of resources during calls to your API. To minimize the size of…