Skip to content

Commit

Permalink
generate resolvers for input types (#1950)
Browse files Browse the repository at this point in the history
  • Loading branch information
FanFani4 authored Feb 25, 2022
1 parent ffa857e commit cfea9f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/resolvergen/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error {

files := map[string]*File{}

for _, o := range data.Objects {
objects := make(codegen.Objects, len(data.Objects)+len(data.Inputs))
copy(objects, data.Objects)
copy(objects[len(data.Objects):], data.Inputs)

for _, o := range objects {
if o.HasResolvers() {
fn := gqlToResolverName(data.Config.Resolver.Dir(), o.Position.Src.Name, data.Config.Resolver.FilenameTemplate)
if files[fn] == nil {
Expand Down

0 comments on commit cfea9f0

Please sign in to comment.