Skip to content

Commit

Permalink
make ctx method resolvers concurrent
Browse files Browse the repository at this point in the history
  • Loading branch information
gracenoah committed Nov 13, 2018
1 parent 4975512 commit 602a83d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion codegen/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ func (f *Field) IsVariable() bool {
}

func (f *Field) IsConcurrent() bool {
return f.IsResolver() && !f.Object.DisableConcurrency
if f.Object.DisableConcurrency {
return false
}
return f.MethodHasContext || f.IsResolver()
}

func (f *Field) GoNameExported() string {
Expand Down

0 comments on commit 602a83d

Please sign in to comment.