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

Method Rewrite

graphql/admin/current_user.go:30–42  ·  view source on GitHub ↗
(ctx context.Context,
	gqlQuery schema.Query)

Source from the content-addressed store, hash-verified

28}
29
30func (gsr *currentUserResolver) Rewrite(ctx context.Context,
31 gqlQuery schema.Query) ([]*dql.GraphQuery, map[string]string, error) {
32
33 name, err := extractName(ctx)
34 if err != nil {
35 return nil, nil, err
36 }
37
38 gqlQuery.Rename("getUser")
39 gqlQuery.SetArgTo("name", name)
40
41 return gsr.baseRewriter.Rewrite(ctx, gqlQuery)
42}

Callers

nothing calls this directly

Calls 4

extractNameFunction · 0.85
RenameMethod · 0.65
SetArgToMethod · 0.65
RewriteMethod · 0.65

Tested by

no test coverage detected