Skip to content

Commit

Permalink
Merge pull request #931 from fridolin-koch/master
Browse files Browse the repository at this point in the history
Fix for Panic if only interfaces shall be generated
  • Loading branch information
vektah authored Jan 19, 2020
2 parents ec4f6b1 + cf14cf1 commit a6c7aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/modelgen/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func (m *Plugin) MutateConfig(cfg *config.Config) error {
cfg.Models.Add(it, "github.com/99designs/gqlgen/graphql.String")
}

if len(b.Models) == 0 && len(b.Enums) == 0 {
if len(b.Models) == 0 && len(b.Enums) == 0 && len(b.Interfaces) == 0 && len(b.Scalars) == 0 {
return nil
}

Expand Down

0 comments on commit a6c7aaf

Please sign in to comment.