func Handler(next http.Handler, logger log.Logger) http.Handler {

	dataLoader := executor.BasicDataLoader{
		Rules: []core.Rule{},
	}

	registry := MainRegistry()

	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()

		exc := &executor.Executor{
			Context:    ctx,
			Registry:   registry,
			DataLoader: dataLoader,
			OnError: func(err error) {
				logger.For(ctx).Error("error executing action", zap.Error(err))
			},
		}
		ctx = NewContext(ctx, exc)

		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
// Handler adds actions framework registry to incoming requests.
Handler adds actions framework registry to incoming requests.
// Handler adds actions framework registry to incoming requests .
func Handler(next http.Handler, logger log.Logger) http.Handler {
	dataLoader := executor.BasicDataLoader{
		Rules: []core.Rule{},
	}
	registry := MainRegistry()
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()
		exc := &executor.Executor{
			Context:    ctx,
			Registry:   registry,
			DataLoader: dataLoader,
			OnError: func(err error) {
				logger.For(ctx).Error("error executing action", zap.Error(err))
			},
		}
		ctx = NewContext(ctx, exc)
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
func Handler ( next http . Handler , logger log . Logger ) http . Handler { dataLoader := executor . BasicDataLoader { Rules : [ ] core . Rule { } , } registry := MainRegistry ( ) return http . HandlerFunc ( func ( w http . ResponseWriter , r * http . Request ) { ctx := r . Context ( ) exc := & executor . Executor { Context : ctx , Registry : registry , DataLoader : dataLoader , OnError : func ( err error ) { logger . For ( ctx ) . Error ( " " , zap . Error ( err ) ) } , } ctx = NewContext ( ctx , exc ) next . ServeHTTP ( w , r . WithContext ( ctx ) ) } ) }
Handler adds actions framework registry to incoming requests.
Handler adds actions framework registry to incoming requests .