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

Method resolve

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

Source from the content-addressed store, hash-verified

321func (introInputValue) typeName() string { return "__InputValue" }
322
323func (x introInputValue) resolve(s *gqlScaffolder, field string, args map[string]any) any {
324 switch field {
325 case "name":
326 return x.name
327 case "description":
328 return optional(x.description)
329 case "type":
330 return introType{x.typ}
331 case "defaultValue":
332 if x.defaultValue == nil {
333 return nil
334 }
335 return x.defaultValue.String()
336 case "isDeprecated":
337 return deprecated(x.directives)
338 case "deprecationReason":
339 return deprecationReason(x.directives)
340 }
341 return nil
342}
343
344func introArgs(defs ast.ArgumentDefinitionList, args map[string]any) []introObject {
345 includeDeprecated, _ := args["includeDeprecated"].(bool)

Callers

nothing calls this directly

Calls 4

optionalFunction · 0.85
deprecatedFunction · 0.85
deprecationReasonFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected