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

Method graphQL

script/ghmock/checker.go:54–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (c *checker) graphQL() (*ast.Schema, error) {
55 c.gqlOnce.Do(func() {
56 path, err := graphQLSource.locate(c.progress)
57 if err != nil {
58 c.gqlErr = err
59 return
60 }
61 data, err := os.ReadFile(path)
62 if err != nil {
63 c.gqlErr = err
64 return
65 }
66 schema, err := loadGraphQLSchema(data, path)
67 if err != nil {
68 c.gqlErr = fmt.Errorf("reading %s: %w", path, err)
69 return
70 }
71 c.gqlSchema = schema
72 c.gqlFile = newSchemaFile(graphQLSource, path, data)
73 })
74 return c.gqlSchema, c.gqlErr
75}
76
77func (c *checker) rest() (*restIndex, error) {
78 c.restOnce.Do(func() {

Callers 7

preloadMethod · 0.95
checkMethod · 0.95
graphQLSchemaMethod · 0.80
schemaCheckFunction · 0.80
requireSchemasFunction · 0.80
scaffoldGraphQLFunction · 0.80
cmdSchemaFunction · 0.80

Calls 5

loadGraphQLSchemaFunction · 0.85
newSchemaFileFunction · 0.85
locateMethod · 0.80
DoMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected