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

Function getPasswordInput

graphql/admin/reset_password.go:43–58  ·  view source on GitHub ↗
(m schema.Mutation)

Source from the content-addressed store, hash-verified

41}
42
43func getPasswordInput(m schema.Mutation) (*edgraph.ResetPasswordInput, error) {
44 var input edgraph.ResetPasswordInput
45
46 inputArg := m.ArgValue(schema.InputArgName)
47 inputByts, err := json.Marshal(inputArg)
48
49 if err != nil {
50 return nil, schema.GQLWrapf(err, "couldn't get input argument")
51 }
52
53 if err := json.Unmarshal(inputByts, &input); err != nil {
54 return nil, schema.GQLWrapf(err, "couldn't get input argument")
55 }
56
57 return &input, nil
58}

Callers 1

resolveResetPasswordFunction · 0.85

Calls 2

GQLWrapfFunction · 0.92
ArgValueMethod · 0.65

Tested by

no test coverage detected