AddTypes is the helper to add types definition to the schema.
(defs ...*Definition)
| 44 | |
| 45 | // AddTypes is the helper to add types definition to the schema. |
| 46 | func (s *Schema) AddTypes(defs ...*Definition) { |
| 47 | if s.Types == nil { |
| 48 | s.Types = make(map[string]*Definition) |
| 49 | } |
| 50 | for _, def := range defs { |
| 51 | s.Types[def.Name] = def |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func (s *Schema) AddPossibleType(name string, def *Definition) { |
| 56 | s.PossibleTypes[name] = append(s.PossibleTypes[name], def) |
nothing calls this directly
no outgoing calls
no test coverage detected