From bdabc0daf0026420b650f03321aa15e1d81d32c2 Mon Sep 17 00:00:00 2001 From: s-ichikawa Date: Wed, 18 Mar 2020 15:35:56 +0900 Subject: [PATCH] delete unused code --- plugin/modelgen/models.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/plugin/modelgen/models.go b/plugin/modelgen/models.go index 82bbdcc5ca4..e0ca186632f 100644 --- a/plugin/modelgen/models.go +++ b/plugin/modelgen/models.go @@ -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 @@ -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 })