MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / isValid

Method isValid

graphql/admin/http.go:268–282  ·  view source on GitHub ↗
(namespace uint64)

Source from the content-addressed store, hash-verified

266}
267
268func (gh *graphqlHandler) isValid(namespace uint64) error {
269 gh.resolverMux.RLock()
270 defer gh.resolverMux.RUnlock()
271 switch {
272 case gh.resolver == nil:
273 return errors.New("resolver is nil")
274 case gh.resolver[namespace] == nil:
275 return errors.New("resolver not found")
276 case gh.resolver[namespace].Schema() == nil:
277 return errors.New("schema is nil")
278 case gh.resolver[namespace].Schema().Meta() == nil:
279 return errors.New("schema meta is nil")
280 }
281 return nil
282}
283
284type gzreadCloser struct {
285 *gzip.Reader

Callers 2

ServeHTTPMethod · 0.95
isValidMethod · 0.45

Calls 4

RLockMethod · 0.80
RUnlockMethod · 0.80
SchemaMethod · 0.65
MetaMethod · 0.65

Tested by

no test coverage detected