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

Method Query

edgraph/server.go:1346–1356  ·  view source on GitHub ↗
(ctx context.Context, req *api.Request)

Source from the content-addressed store, hash-verified

1344}
1345
1346func (s *Server) Query(ctx context.Context, req *api.Request) (*api.Response, error) {
1347 resp, err := s.QueryNoGrpc(ctx, req)
1348 if err != nil {
1349 return resp, err
1350 }
1351 md := metadata.Pairs(x.DgraphCostHeader, fmt.Sprint(resp.Metrics.NumUids["_total"]))
1352 if err := grpc.SendHeader(ctx, md); err != nil {
1353 glog.Warningf("error in sending grpc headers: %v", err)
1354 }
1355 return resp, nil
1356}
1357
1358// Query handles queries or mutations
1359func (s *Server) QueryNoGrpc(ctx context.Context, req *api.Request) (*api.Response, error) {

Callers 15

TestDropAllFunction · 0.45
TestDropDataFunction · 0.45
TestDropPredicateFunction · 0.45
TestDropTypeFunction · 0.45
auditHttpFunction · 0.45
PasswordExportFunction · 0.45
PasswordImportFunction · 0.45
TestSchemaFunction · 0.45

Calls 2

QueryNoGrpcMethod · 0.95
WarningfMethod · 0.80

Tested by 15

TestDropAllFunction · 0.36
TestDropDataFunction · 0.36
TestDropPredicateFunction · 0.36
TestDropTypeFunction · 0.36
PasswordExportFunction · 0.36
PasswordImportFunction · 0.36
TestSchemaFunction · 0.36