In a debugging session with @joelalejandro, we found that /articles?include=author.comments crashed the app, and made it unresponsive.
We found that this was caused by a faulty assumption in the resource definition of the included resources. Specifically in the canAccessResource function.
This PR fixes this issue, and also ensures that nested resources relations are not included in the main resource definition.
In a debugging session with @joelalejandro, we found that /articles?include=author.comments crashed the app, and made it unresponsive.
We found that this was caused by a faulty assumption in the resource definition of the included resources. Specifically in the canAccessResource function.
This PR fixes this issue, and also ensures that nested resources relations are not included in the main resource definition.