MCPcopy Create free account
hub / github.com/vektah/gqlparser / LoadSchema

Function LoadSchema

gqlparser.go:13–24  ·  view source on GitHub ↗
(str ...*ast.Source)

Source from the content-addressed store, hash-verified

11)
12
13func LoadSchema(str ...*ast.Source) (*ast.Schema, error) {
14 schema, err := validator.LoadSchema(append([]*ast.Source{validator.Prelude}, str...)...)
15 gqlErr := &gqlerror.Error{}
16 ok := errors.As(err, &gqlErr)
17 if ok {
18 return schema, gqlErr
19 }
20 if err != nil {
21 return schema, gqlerror.Wrap(err)
22 }
23 return schema, nil
24}
25
26func MustLoadSchema(str ...*ast.Source) *ast.Schema {
27 s, err := validator.LoadSchema(append([]*ast.Source{validator.Prelude}, str...)...)

Callers

nothing calls this directly

Calls 3

LoadSchemaFunction · 0.92
WrapFunction · 0.92
AsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…