From 9dd208a76c75532c0c82d939fd96db851bc6265b Mon Sep 17 00:00:00 2001 From: Michael Caulley Date: Thu, 5 Mar 2026 16:45:42 -0500 Subject: [PATCH] fix: remove duplicate graphql import in generated files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The graphql package was being imported twice in generated files — once via the import/additional/graphql-enum hook defined in enum.tmpl, and again in the explicit import blocks of node.tmpl, pagination.tmpl, collection.tmpl, and edge.tmpl. --- entgql/template/collection.tmpl | 1 - entgql/template/edge.tmpl | 1 - entgql/template/node.tmpl | 1 - entgql/template/pagination.tmpl | 1 - 4 files changed, 4 deletions(-) diff --git a/entgql/template/collection.tmpl b/entgql/template/collection.tmpl index 6d373b15d..c12afa7a7 100644 --- a/entgql/template/collection.tmpl +++ b/entgql/template/collection.tmpl @@ -15,7 +15,6 @@ in the LICENSE file in the root directory of this source tree. import ( "entgo.io/contrib/entgql" - "github.com/99designs/gqlgen/graphql" {{- range $n := $gqlNodes }} "{{ $.Config.Package }}/{{ $n.Package }}" {{- end }} diff --git a/entgql/template/edge.tmpl b/entgql/template/edge.tmpl index 804322afd..4af8530cc 100644 --- a/entgql/template/edge.tmpl +++ b/entgql/template/edge.tmpl @@ -15,7 +15,6 @@ import ( "context" "entgo.io/contrib/entgql" - "github.com/99designs/gqlgen/graphql" ) {{ range $n := filterNodes $.Nodes (skipMode "type") }} diff --git a/entgql/template/node.tmpl b/entgql/template/node.tmpl index 80c88b6e5..a44eb03e1 100644 --- a/entgql/template/node.tmpl +++ b/entgql/template/node.tmpl @@ -40,7 +40,6 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/schema" "entgo.io/contrib/entgql" - "github.com/99designs/gqlgen/graphql" "github.com/hashicorp/go-multierror" "golang.org/x/sync/semaphore" ) diff --git a/entgql/template/pagination.tmpl b/entgql/template/pagination.tmpl index 6a7a96a8b..1cf73d2d5 100644 --- a/entgql/template/pagination.tmpl +++ b/entgql/template/pagination.tmpl @@ -34,7 +34,6 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/contrib/entgql" - "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/errcode" "github.com/vektah/gqlparser/v2/gqlerror" "github.com/vmihailenco/msgpack/v5"