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

Method AddTypes

ast/document.go:46–53  ·  view source on GitHub ↗

AddTypes is the helper to add types definition to the schema.

(defs ...*Definition)

Source from the content-addressed store, hash-verified

44
45// AddTypes is the helper to add types definition to the schema.
46func (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
55func (s *Schema) AddPossibleType(name string, def *Definition) {
56 s.PossibleTypes[name] = append(s.PossibleTypes[name], def)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected