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

Function loadGraphQLSchema

script/ghmock/graphqlcheck.go:19–25  ·  view source on GitHub ↗
(data []byte, name string)

Source from the content-addressed store, hash-verified

17)
18
19func loadGraphQLSchema(data []byte, name string) (*ast.Schema, error) {
20 schema, err := gqlparser.LoadSchema(&ast.Source{Name: name, Input: string(data)})
21 if err != nil {
22 return nil, errors.New(graphQLErrorText(err))
23 }
24 return schema, nil
25}
26
27// checkGraphQLQuery parses gh's query and validates it against the schema. It
28// returns a usable operation even when validation finds non-cyclic problems,

Callers 2

schemafiles.goFile · 0.85
graphQLMethod · 0.85

Calls 1

graphQLErrorTextFunction · 0.85

Tested by

no test coverage detected