Skip to content

Commit

Permalink
Update addExtensionResults with AppendErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fontinalis committed Mar 12, 2019
1 parent 7fd6d89 commit b92b14d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ type FieldResolver interface {
Resolve(p ResolveParams) (interface{}, error)
}

// defaultResolveFn If a resolve function is not given, then a default resolve behavior is used
// DefaultResolveFn If a resolve function is not given, then a default resolve behavior is used
// which takes the property of the source object of the same name as the field
// and returns it as the result, or if it's a function, returns the result
// of calling that function.
Expand Down
2 changes: 1 addition & 1 deletion extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func addExtensionResults(p *ExecuteParams, result *Result) {
func() {
defer func() {
if r := recover(); r != nil {
result.Errors = append(result.Errors, gqlerrors.FormatError(fmt.Errorf("%s.GetResult: %v", ext.Name(), r.(error))))
result.AppendErrors(gqlerrors.FormatError(fmt.Errorf("%s.GetResult: %v", ext.Name(), r.(error))))
}
}()
if ext.HasResult() {
Expand Down

0 comments on commit b92b14d

Please sign in to comment.