Skip to content

Commit

Permalink
Fix Complexity case selection
Browse files Browse the repository at this point in the history
Use GraphQL field name rather than the Go field name.
  • Loading branch information
mbranch committed Apr 10, 2019
1 parent 5ff6092 commit 3047f5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/generated!.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
{{ if not $object.IsReserved }}
{{ range $field := $object.UniqueFields }}
{{ if not $field.IsReserved }}
case "{{$object.Name}}.{{$field.GoFieldName}}":
case "{{$object.Name}}.{{$field.Name}}":
if e.complexity.{{$object.Name|go}}.{{$field.GoFieldName}} == nil {
break
}
Expand Down

0 comments on commit 3047f5c

Please sign in to comment.