(str ...*ast.Source)
| 11 | ) |
| 12 | |
| 13 | func 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 | |
| 26 | func MustLoadSchema(str ...*ast.Source) *ast.Schema { |
| 27 | s, err := validator.LoadSchema(append([]*ast.Source{validator.Prelude}, str...)...) |
nothing calls this directly
no test coverage detected
searching dependent graphs…