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

Function getMaskedFieldVarName

audit/interceptor.go:296–318  ·  view source on GitHub ↗
(f *ast.Field)

Source from the content-addressed store, hash-verified

294}
295
296func getMaskedFieldVarName(f *ast.Field) string {
297 switch f.Name {
298 case "resetPassword":
299 for _, a := range f.Arguments {
300 if a.Name != "input" || a.Value == nil || a.Value.Children == nil {
301 continue
302 }
303
304 for _, c := range a.Value.Children {
305 if c.Name == "password" && c.Value.Kind == ast.Variable {
306 return c.Value.String()
307 }
308 }
309 }
310 case "login":
311 for _, a := range f.Arguments {
312 if a.Name == "password" && a.Value.Kind == ast.Variable {
313 return a.Value.String()
314 }
315 }
316 }
317 return ""
318}
319
320var skipReqBodyGrpc = map[string]bool{
321 "Login": true,

Callers 1

maskPasswordFieldsInGQLFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…