Is it possible to suppress an afterQuery hook when viewing a collection from the Content Manager?

I am currently running an afterQuery hook in a collection that has a reference to Members/PublicData. In the hook I get the referenced member object using the .getMember() function from the wix-members-backend API. I then add it as a property to the item that the hook returns. I do not want this hook to run when I view the collection from the Content Manager though, as I believe the call to .getMember() is making the collection load tremendously slow. Is it possible to suppress this hook when viewing the collection from the content manager? Thanks!

No. But you can do something like this:

export function collection_afterQuery(item, context) {
const skipHookUsers = ['userId1', 'userId2'/*etc*/]//list of admin IDs that are allowed to view the content manager but never test the site.

 if(!skipHookUsers.includes(context.userId)){
  //your hook code that ends with return item;
 }
return item;//this return is for the skipHookUsers
}

This is nifty thanks JD