MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / ToSubGraph

Function ToSubGraph

query/query.go:759–769  ·  view source on GitHub ↗

ToSubGraph converts the GraphQuery into the pb.SubGraph instance type.

(ctx context.Context, gq *dql.GraphQuery)

Source from the content-addressed store, hash-verified

757
758// ToSubGraph converts the GraphQuery into the pb.SubGraph instance type.
759func ToSubGraph(ctx context.Context, gq *dql.GraphQuery) (*SubGraph, error) {
760 sg, err := newGraph(ctx, gq)
761 if err != nil {
762 return nil, err
763 }
764 err = treeCopy(gq, sg)
765 if err != nil {
766 return nil, err
767 }
768 return sg, err
769}
770
771// ContextKey is used to set options in the context object.
772type ContextKey int

Callers 1

ProcessQueryMethod · 0.85

Calls 2

newGraphFunction · 0.85
treeCopyFunction · 0.85

Tested by

no test coverage detected