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

Method introspectionRoot

script/ghmock/introspection.go:26–38  ·  view source on GitHub ↗
(f *ast.Field)

Source from the content-addressed store, hash-verified

24}
25
26func (s *gqlScaffolder) introspectionRoot(f *ast.Field) introObject {
27 switch f.Name {
28 case "__schema":
29 return introSchema{}
30 case "__type":
31 name, _ := s.arguments(f)["name"].(string)
32 if s.schema.Types[name] == nil {
33 return nil
34 }
35 return introType{ast.NamedType(name, nil)}
36 }
37 return nil
38}
39
40func (s *gqlScaffolder) mergeIntrospection(path string, existing, resolved any, sel ast.SelectionSet, record bool) any {
41 switch source := resolved.(type) {

Callers 2

fillObjectMethod · 0.95
introspectMethod · 0.95

Calls 1

argumentsMethod · 0.95

Tested by

no test coverage detected