From cac3c729ad5fbb5d0e4de0b156c7a0f6f5453b24 Mon Sep 17 00:00:00 2001 From: Luke Cawood Date: Tue, 21 Aug 2018 11:36:32 +1000 Subject: [PATCH] Explicitly import ambient imports so dep doesn't prune them --- codegen/import_build.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codegen/import_build.go b/codegen/import_build.go index 3bad3a26fd2..d7d96774454 100644 --- a/codegen/import_build.go +++ b/codegen/import_build.go @@ -6,6 +6,13 @@ import ( "sort" "strconv" "strings" + + // Import and ignore the ambient imports listed below so dependency managers + // don't prune unused code for us. Both lists should be kept in sync. + _ "github.com/99designs/gqlgen/graphql" + _ "github.com/99designs/gqlgen/graphql/introspection" + _ "github.com/vektah/gqlparser" + _ "github.com/vektah/gqlparser/ast" ) // These imports are referenced by the generated code, and are assumed to have the