From e5ff6bc2c3bedb73df62f81a35056957c061f81c Mon Sep 17 00:00:00 2001 From: asamusev Date: Fri, 29 Mar 2019 13:28:12 +0300 Subject: [PATCH] add extra builtins types when no type exists --- codegen/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/config/config.go b/codegen/config/config.go index 7a7232b58d9..0c72420e602 100644 --- a/codegen/config/config.go +++ b/codegen/config/config.go @@ -368,7 +368,7 @@ func (c *Config) InjectBuiltins(s *ast.Schema) { } for typeName, entry := range extraBuiltins { - if t, ok := s.Types[typeName]; ok && t.Kind == ast.Scalar { + if t, ok := s.Types[typeName]; !c.Models.Exists(typeName) && ok && t.Kind == ast.Scalar { c.Models[typeName] = entry } }