Skip to content

Commit 89abc97

Browse files
committed
stylistic changes
1 parent b33d1a1 commit 89abc97

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

src/execution/execute.js

+22-6
Original file line numberDiff line numberDiff line change
@@ -590,16 +590,14 @@ function resolveField(
590590
// or abrupt (error).
591591
const result = resolveOrError(resolveFn, source, args, context, info);
592592

593-
const completed = completeValueCatchingError(
593+
return completeValueCatchingError(
594594
exeContext,
595595
returnType,
596596
fieldASTs,
597597
info,
598598
exePath,
599599
result
600600
);
601-
602-
return completed;
603601
}
604602

605603
// Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField`
@@ -634,7 +632,13 @@ function completeValueCatchingError(
634632
// protection from errors.
635633
if (returnType instanceof GraphQLNonNull) {
636634
return completeValue(
637-
exeContext, returnType, fieldASTs, info, exePath, result);
635+
exeContext,
636+
returnType,
637+
fieldASTs,
638+
info,
639+
exePath,
640+
result
641+
);
638642
}
639643

640644
// Otherwise, error protection is applied, logging the error and resolving
@@ -747,7 +751,13 @@ function completeValue(
747751
// If field type is List, complete each item in the list with the inner type
748752
if (returnType instanceof GraphQLList) {
749753
return completeListValue(
750-
exeContext, returnType, fieldASTs, info, exePath, result);
754+
exeContext,
755+
returnType,
756+
fieldASTs,
757+
info,
758+
exePath,
759+
result
760+
);
751761
}
752762

753763
// If field type is a leaf type, Scalar or Enum, serialize to a valid value,
@@ -819,7 +829,13 @@ function completeListValue(
819829
childExePath.push(index);
820830

821831
const completedItem = completeValueCatchingError(
822-
exeContext, itemType, fieldASTs, info, childExePath, item);
832+
exeContext,
833+
itemType,
834+
fieldASTs,
835+
info,
836+
childExePath,
837+
item
838+
);
823839

824840
if (!containsPromise && isThenable(completedItem)) {
825841
containsPromise = true;

0 commit comments

Comments
 (0)