Skip to content

Commit

Permalink
Merge pull request #652 from andrey1s/extraBuiltins
Browse files Browse the repository at this point in the history
add extra builtins types when no type exists
  • Loading branch information
vektah authored Apr 3, 2019
2 parents c93d92b + e5ff6bc commit a2e5936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit a2e5936

Please sign in to comment.