Skip to content

Commit

Permalink
call ExecutorCb on base server
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbbb committed Feb 24, 2025
1 parent 5464f41 commit be6cc49
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/core/presentation/controllers/graphql_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ func (g *GraphQLController) Register(r *mux.Router) {
},
)
srv := graphql.NewBaseServer(schema)

for _, schema := range g.app.GraphSchemas() {
srv.AddExecutor(executor.New(schema.Value))
exec := executor.New(schema.Value)
if schema.ExecutorCb != nil {
schema.ExecutorCb(exec)
}
srv.AddExecutor(exec)
}
router := r.Methods(http.MethodGet, http.MethodPost).Subrouter()
router.Use(
Expand Down

0 comments on commit be6cc49

Please sign in to comment.