MCPcopy
hub / github.com/dgraph-io/dgraph / NewServer

Function NewServer

graphql/admin/http.go:60–67  ·  view source on GitHub ↗

NewServer returns a new IServeGraphQL that can serve the given resolvers

()

Source from the content-addressed store, hash-verified

58
59// NewServer returns a new IServeGraphQL that can serve the given resolvers
60func NewServer() IServeGraphQL {
61 gh := &graphqlHandler{
62 resolver: make(map[uint64]*resolve.RequestResolver),
63 poller: make(map[uint64]*subscription.Poller),
64 }
65 gh.handler = recoveryHandler(commonHeaders(gh.Handler()))
66 return gh
67}
68
69func (gh *graphqlHandler) Set(ns uint64, schemaEpoch *uint64, resolver *resolve.RequestResolver) {
70 gh.resolverMux.Lock()

Callers 1

NewServersFunction · 0.85

Calls 3

HandlerMethod · 0.95
recoveryHandlerFunction · 0.85
commonHeadersFunction · 0.85

Tested by

no test coverage detected