Skip to content

Commit

Permalink
add extra builtins types when no type exists
Browse files Browse the repository at this point in the history
  • Loading branch information
asamusev authored and andrey1s committed Mar 29, 2019
1 parent 7b533df commit e5ff6bc
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 e5ff6bc

Please sign in to comment.