Skip to content

Commit

Permalink
Add resolver commit (#2434)
Browse files Browse the repository at this point in the history
* Add resolver commit

* Add version to comment and re-generate

Signed-off-by: Steve Coffman <[email protected]>

Signed-off-by: Steve Coffman <[email protected]>
Co-authored-by: Steve Coffman <[email protected]>
  • Loading branch information
voslartomas and StevenACoffman authored Nov 25, 2022
1 parent 3087cf3 commit 89e91da
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions _examples/config/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/config/todo.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/config/user.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/federation/accounts/graph/entity.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/federation/accounts/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/federation/products/graph/entity.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/federation/products/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/federation/reviews/graph/entity.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/federation/reviews/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions plugin/resolvergen/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 89e91da

Please sign in to comment.