Skip to content

Commit b92b14d

Browse files
committed
Update addExtensionResults with AppendErrors
1 parent 7fd6d89 commit b92b14d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ type FieldResolver interface {
933933
Resolve(p ResolveParams) (interface{}, error)
934934
}
935935

936-
// defaultResolveFn If a resolve function is not given, then a default resolve behavior is used
936+
// DefaultResolveFn If a resolve function is not given, then a default resolve behavior is used
937937
// which takes the property of the source object of the same name as the field
938938
// and returns it as the result, or if it's a function, returns the result
939939
// of calling that function.

extensions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func addExtensionResults(p *ExecuteParams, result *Result) {
236236
func() {
237237
defer func() {
238238
if r := recover(); r != nil {
239-
result.Errors = append(result.Errors, gqlerrors.FormatError(fmt.Errorf("%s.GetResult: %v", ext.Name(), r.(error))))
239+
result.AppendErrors(gqlerrors.FormatError(fmt.Errorf("%s.GetResult: %v", ext.Name(), r.(error))))
240240
}
241241
}()
242242
if ext.HasResult() {

0 commit comments

Comments
 (0)