diff --git a/_examples/config/schema.resolvers.go b/_examples/config/schema.resolvers.go index fbadcb4e9da..fcdb18dc7ca 100644 --- a/_examples/config/schema.resolvers.go +++ b/_examples/config/schema.resolvers.go @@ -2,6 +2,7 @@ package config // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/config/todo.resolvers.go b/_examples/config/todo.resolvers.go index efadcb12407..ce22e13a157 100644 --- a/_examples/config/todo.resolvers.go +++ b/_examples/config/todo.resolvers.go @@ -2,6 +2,7 @@ package config // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/config/user.resolvers.go b/_examples/config/user.resolvers.go index c8779dca3fd..21156cd5638 100644 --- a/_examples/config/user.resolvers.go +++ b/_examples/config/user.resolvers.go @@ -2,6 +2,7 @@ package config // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/federation/accounts/graph/entity.resolvers.go b/_examples/federation/accounts/graph/entity.resolvers.go index 5768e8a65f3..a53072ea19f 100644 --- a/_examples/federation/accounts/graph/entity.resolvers.go +++ b/_examples/federation/accounts/graph/entity.resolvers.go @@ -2,6 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/federation/accounts/graph/schema.resolvers.go b/_examples/federation/accounts/graph/schema.resolvers.go index 34298d54f40..f06c7cfe066 100644 --- a/_examples/federation/accounts/graph/schema.resolvers.go +++ b/_examples/federation/accounts/graph/schema.resolvers.go @@ -2,6 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/federation/products/graph/entity.resolvers.go b/_examples/federation/products/graph/entity.resolvers.go index 979867d29a7..295876bcbb6 100644 --- a/_examples/federation/products/graph/entity.resolvers.go +++ b/_examples/federation/products/graph/entity.resolvers.go @@ -2,6 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/federation/products/graph/schema.resolvers.go b/_examples/federation/products/graph/schema.resolvers.go index f53bc084344..bbb2d9065ef 100644 --- a/_examples/federation/products/graph/schema.resolvers.go +++ b/_examples/federation/products/graph/schema.resolvers.go @@ -2,6 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/federation/reviews/graph/entity.resolvers.go b/_examples/federation/reviews/graph/entity.resolvers.go index 03a4f3196e2..11708ae8ee6 100644 --- a/_examples/federation/reviews/graph/entity.resolvers.go +++ b/_examples/federation/reviews/graph/entity.resolvers.go @@ -2,6 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/_examples/federation/reviews/graph/schema.resolvers.go b/_examples/federation/reviews/graph/schema.resolvers.go index 824eb6d51cf..2849907a5d0 100644 --- a/_examples/federation/reviews/graph/schema.resolvers.go +++ b/_examples/federation/reviews/graph/schema.resolvers.go @@ -2,6 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/plugin/federation/testdata/entityresolver/entity.resolvers.go b/plugin/federation/testdata/entityresolver/entity.resolvers.go index 74d89c9f649..a37bc1a9d47 100644 --- a/plugin/federation/testdata/entityresolver/entity.resolvers.go +++ b/plugin/federation/testdata/entityresolver/entity.resolvers.go @@ -2,6 +2,7 @@ package entityresolver // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.20-dev DO NOT EDIT. import ( "context" diff --git a/plugin/resolvergen/resolver.go b/plugin/resolvergen/resolver.go index aa3be72739e..3f136ab03fb 100644 --- a/plugin/resolvergen/resolver.go +++ b/plugin/resolvergen/resolver.go @@ -9,13 +9,15 @@ import ( "path/filepath" "strings" + "golang.org/x/text/cases" + "golang.org/x/text/language" + "github.com/99designs/gqlgen/codegen" "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/codegen/templates" + "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/internal/rewrite" "github.com/99designs/gqlgen/plugin" - "golang.org/x/text/cases" - "golang.org/x/text/language" ) //go:embed resolver.gotpl @@ -52,7 +54,7 @@ func (m *Plugin) generateSingleFile(data *codegen.Data) error { file := File{} if _, err := os.Stat(data.Config.Resolver.Filename); err == nil { - // file already exists and we dont support updating resolvers with layout = single so just return + // file already exists and we do not support updating resolvers with layout = single so just return return nil } @@ -152,7 +154,8 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error { PackageName: data.Config.Resolver.Package, FileNotice: ` // This file will be automatically regenerated based on the schema, any resolver implementations - // will be copied through when generating and any unknown code will be moved to the end.`, + // will be copied through when generating and any unknown code will be moved to the end. + // Code generated by github.com/99designs/gqlgen version ` + graphql.Version + ` DO NOT EDIT.`, Filename: filename, Data: resolverBuild, Packages: data.Config.Packages,