I wrote some middleware to block banned users, but...
# orm-help
j
I wrote some middleware to block banned users, but it seems as though it's getting called five times on every call:
Copy code
export const blockBannedUserMiddleware = async (resolve: any, parent: any, args: any, context: Context, info: any) => {
  // check if user is banned based on context, if so throw forbidden error
  return resolve(parent, args, context, info);
};
j
Could you show us the piece of code that calls it? Looking at this I personally don't see any reason it'd be called multiple times.