@@ -590,16 +590,14 @@ function resolveField(
590
590
// or abrupt (error).
591
591
const result = resolveOrError ( resolveFn , source , args , context , info ) ;
592
592
593
- const completed = completeValueCatchingError (
593
+ return completeValueCatchingError (
594
594
exeContext ,
595
595
returnType ,
596
596
fieldASTs ,
597
597
info ,
598
598
exePath ,
599
599
result
600
600
) ;
601
-
602
- return completed ;
603
601
}
604
602
605
603
// Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField`
@@ -634,7 +632,13 @@ function completeValueCatchingError(
634
632
// protection from errors.
635
633
if ( returnType instanceof GraphQLNonNull ) {
636
634
return completeValue (
637
- exeContext , returnType , fieldASTs , info , exePath , result ) ;
635
+ exeContext ,
636
+ returnType ,
637
+ fieldASTs ,
638
+ info ,
639
+ exePath ,
640
+ result
641
+ ) ;
638
642
}
639
643
640
644
// Otherwise, error protection is applied, logging the error and resolving
@@ -747,7 +751,13 @@ function completeValue(
747
751
// If field type is List, complete each item in the list with the inner type
748
752
if (returnType instanceof GraphQLList) {
749
753
return completeListValue (
750
- exeContext , returnType , fieldASTs , info , exePath , result ) ;
754
+ exeContext ,
755
+ returnType ,
756
+ fieldASTs ,
757
+ info ,
758
+ exePath ,
759
+ result
760
+ ) ;
751
761
}
752
762
753
763
// If field type is a leaf type, Scalar or Enum, serialize to a valid value,
@@ -819,7 +829,13 @@ function completeListValue(
819
829
childExePath . push ( index ) ;
820
830
821
831
const completedItem = completeValueCatchingError (
822
- exeContext , itemType , fieldASTs , info , childExePath , item ) ;
832
+ exeContext ,
833
+ itemType ,
834
+ fieldASTs ,
835
+ info ,
836
+ childExePath ,
837
+ item
838
+ ) ;
823
839
824
840
if ( ! containsPromise && isThenable ( completedItem ) ) {
825
841
containsPromise = true ;
0 commit comments