I'm using Loopback, and I'm trying to figure out how I can tell in an Operational Hook if the model is being accessed as a result of a query to the original end point or through a relationship.
I have some custom filtering I am doing that is unrelated to the ACL, and it works well when querying a specific endpoint. However, it has been causing some issues when querying an endpoint, and then including related models. Thus, I'd like to be able to detect when the model is being accessed via a relationship, and disable the filtering for these instances.
Any suggestions on how to go about doing this?
Thanks in advance!