         
         //---
         
-        syncMiddleware(mutation)
+        addMiddlewareIfNeeded(mutation)
         
         //---
         

            
            $0(state, mutation, proxy.submit)
        }
        
        //---
        

    
    //===
    
    func addMiddlewareIfNeeded(_ mutation: GlobalMutationExt)
    {
        let mutationType = type(of: mutation)
        let key = mutationType.feature.name
        
        if
            mutationType.kind == .addition
        {
            middleware[key] = mutationType.feature.middleware
        }
    }
    
    func removeMiddlewareIfNeeded(_ mutation: GlobalMutationExt)
    {
        let mutationType = type(of: mutation)
        let key = mutationType.feature.name
        
        if
            mutationType.kind == .removal
        {
            middleware[key] = nil
        }
    }
}
