Skip to content

Commit

Permalink
Fix multiple schemas in config
Browse files Browse the repository at this point in the history
  • Loading branch information
sonatard committed Dec 31, 2023
1 parent c8ef9d8 commit 5ad012d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func LoadConfig(filename string) (*Config, error) {
}

// https://github.com/99designs/gqlgen/blob/3a31a752df764738b1f6e99408df3b169d514784/codegen/config/config.go#L120
files := StringList{}
for _, f := range cfg.SchemaFilename {
var matches []string

Expand Down Expand Up @@ -168,16 +169,16 @@ func LoadConfig(filename string) (*Config, error) {
}
}

files := StringList{}
for _, m := range matches {
if !files.Has(m) {
files = append(files, m)
}
}

cfg.SchemaFilename = files
}

cfg.SchemaFilename = files

models := make(config.TypeMap)
if cfg.Models != nil {
models = cfg.Models
Expand Down

0 comments on commit 5ad012d

Please sign in to comment.