From a9f507ca1e88743a29e263c45fb53e95197bedb3 Mon Sep 17 00:00:00 2001 From: sonatard Date: Sun, 31 Dec 2023 16:20:11 +0900 Subject: [PATCH] Fix multiple schemas in config --- config/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 5fd528a..4dc3e6e 100644 --- a/config/config.go +++ b/config/config.go @@ -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 @@ -168,16 +169,15 @@ 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