Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Why does graphql need a router? There is also one static route. Use
http.HandleFunc("/graphql", graphqlHandler)
Taste of course:
https://github.com/vardius/gorouter
https://github.com/goji/goji
In my projects I use Mux from Gorilla or Chi . I like the latter more, because of the design of group routes, for example:
r.Route(fmt.Sprintf("/%s", "manage"), func(r chi.Router) {
r.Handle("/prometheus", promhttp.Handler())
r.Get("/health", controllers.Health)
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question