kurierjs / kurier

TypeScript framework to create JSON:API compliant APIs
https://kurier.readthedocs.io/en/latest/
MIT License
61 stars 9 forks source link

Fix nested included relationships #314

Closed spersico closed 2 years ago

spersico commented 2 years ago

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.