MCPcopy
hub / github.com/dosco/graphjin / apiHandler

Method apiHandler

serv/api.go:743–751  ·  view source on GitHub ↗
(ns *string, ah auth.HandlerFunc, rest bool)

Source from the content-addressed store, hash-verified

741}
742
743func (s *HttpService) apiHandler(ns *string, ah auth.HandlerFunc, rest bool) http.Handler {
744 var h http.Handler
745 if rest {
746 h = s.apiV1Rest(ns, ah)
747 } else {
748 h = s.apiV1GraphQL(ns, ah)
749 }
750 return apiV1Handler(s, ns, h, ah)
751}
752
753// WebUI is the http handler the web ui endpoint
754func (s *HttpService) WebUI(routePrefix, gqlEndpoint string) http.Handler {

Callers 4

GraphQLMethod · 0.95
GraphQLWithNSMethod · 0.95
RESTMethod · 0.95
RESTWithNSMethod · 0.95

Calls 3

apiV1RestMethod · 0.95
apiV1GraphQLMethod · 0.95
apiV1HandlerFunction · 0.85

Tested by

no test coverage detected