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

Function extractName

graphql/admin/current_user.go:21–28  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

19}
20
21func extractName(ctx context.Context) (string, error) {
22 accessJwt, err := x.ExtractJwt(ctx)
23 if err != nil {
24 return "", err
25 }
26
27 return x.ExtractUserName(accessJwt)
28}
29
30func (gsr *currentUserResolver) Rewrite(ctx context.Context,
31 gqlQuery schema.Query) ([]*dql.GraphQuery, map[string]string, error) {

Callers 1

RewriteMethod · 0.85

Calls 2

ExtractJwtFunction · 0.92
ExtractUserNameFunction · 0.92

Tested by

no test coverage detected