MCPcopy Create free account
hub / github.com/cli/cli / resolve

Method resolve

script/ghmock/introspection.go:377–395  ·  view source on GitHub ↗
(s *gqlScaffolder, field string, args map[string]any)

Source from the content-addressed store, hash-verified

375func (introDirective) typeName() string { return "__Directive" }
376
377func (x introDirective) resolve(s *gqlScaffolder, field string, args map[string]any) any {
378 switch field {
379 case "name":
380 return x.d.Name
381 case "description":
382 return optional(x.d.Description)
383 case "isRepeatable":
384 return x.d.IsRepeatable
385 case "locations":
386 locations := make([]any, len(x.d.Locations))
387 for i, l := range x.d.Locations {
388 locations[i] = string(l)
389 }
390 return locations
391 case "args":
392 return introArgs(x.d.Arguments, args)
393 }
394 return nil
395}
396
397func deprecationReason(dirs ast.DirectiveList) any {
398 d := dirs.ForName("deprecated")

Callers

nothing calls this directly

Calls 2

optionalFunction · 0.85
introArgsFunction · 0.85

Tested by

no test coverage detected