Skip to content

Commit

Permalink
Merge pull request #1112 from s-ichikawa/delete-unused-code
Browse files Browse the repository at this point in the history
delete unused code
  • Loading branch information
vektah authored Mar 18, 2020
2 parents dfb6558 + 5149231 commit c68df3c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions plugin/modelgen/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (m *Plugin) MutateConfig(cfg *config.Config) error {
PackageName: cfg.Model.Package,
}

hasEntity := false
for _, schemaType := range cfg.Schema.Types {
if cfg.Models.UserDefined(schemaType.Name) {
continue
Expand Down Expand Up @@ -190,13 +189,6 @@ func (m *Plugin) MutateConfig(cfg *config.Config) error {
b.Scalars = append(b.Scalars, schemaType.Name)
}
}
if hasEntity {
it := &Interface{
Description: "_Entity represents all types with @key",
Name: "_Entity",
}
b.Interfaces = append(b.Interfaces, it)
}
sort.Slice(b.Enums, func(i, j int) bool { return b.Enums[i].Name < b.Enums[j].Name })
sort.Slice(b.Models, func(i, j int) bool { return b.Models[i].Name < b.Models[j].Name })
sort.Slice(b.Interfaces, func(i, j int) bool { return b.Interfaces[i].Name < b.Interfaces[j].Name })
Expand Down

0 comments on commit c68df3c

Please sign in to comment.