From ba495e35625af241a68830d6d2e9954f36195a87 Mon Sep 17 00:00:00 2001 From: vvakame Date: Tue, 7 Aug 2018 17:25:41 +0900 Subject: [PATCH 1/2] stop pickup "github.com/vektah/gqlgen/handler" from GOPATH --- codegen/import_build.go | 1 + 1 file changed, 1 insertion(+) diff --git a/codegen/import_build.go b/codegen/import_build.go index 3bad3a26fd2..9fa77315a82 100644 --- a/codegen/import_build.go +++ b/codegen/import_build.go @@ -23,6 +23,7 @@ var ambientImports = []string{ "github.com/vektah/gqlparser", "github.com/vektah/gqlparser/ast", "github.com/99designs/gqlgen/graphql", + "github.com/99designs/gqlgen/handler", "github.com/99designs/gqlgen/graphql/introspection", } From 916fe6afd664e3772e6f01e9e76d47b4117220c1 Mon Sep 17 00:00:00 2001 From: vvakame Date: Thu, 9 Aug 2018 12:08:59 +0900 Subject: [PATCH 2/2] address comment --- codegen/build.go | 1 + codegen/import_build.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/build.go b/codegen/build.go index 2f6f1e601e0..42dedbf872b 100644 --- a/codegen/build.go +++ b/codegen/build.go @@ -86,6 +86,7 @@ func (cfg *Config) resolver() (*ResolverBuild, error) { namedTypes := cfg.buildNamedTypes() imports := buildImports(namedTypes, destDir) imports.add(cfg.Exec.ImportPath()) + imports.add("github.com/99designs/gqlgen/handler") // avoid import github.com/vektah/gqlgen/handler cfg.bindTypes(imports, namedTypes, destDir, prog) diff --git a/codegen/import_build.go b/codegen/import_build.go index 9fa77315a82..3bad3a26fd2 100644 --- a/codegen/import_build.go +++ b/codegen/import_build.go @@ -23,7 +23,6 @@ var ambientImports = []string{ "github.com/vektah/gqlparser", "github.com/vektah/gqlparser/ast", "github.com/99designs/gqlgen/graphql", - "github.com/99designs/gqlgen/handler", "github.com/99designs/gqlgen/graphql/introspection", }