(exeContext, returnType, fieldNodes, info, path3, result)
| 11647 | return null; |
| 11648 | } |
| 11649 | function completeValue(exeContext, returnType, fieldNodes, info, path3, result) { |
| 11650 | if (result instanceof Error) { |
| 11651 | throw result; |
| 11652 | } |
| 11653 | if ((0, _definition.isNonNullType)(returnType)) { |
| 11654 | const completed = completeValue( |
| 11655 | exeContext, |
| 11656 | returnType.ofType, |
| 11657 | fieldNodes, |
| 11658 | info, |
| 11659 | path3, |
| 11660 | result |
| 11661 | ); |
| 11662 | if (completed === null) { |
| 11663 | throw new Error( |
| 11664 | `Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.` |
| 11665 | ); |
| 11666 | } |
| 11667 | return completed; |
| 11668 | } |
| 11669 | if (result == null) { |
| 11670 | return null; |
| 11671 | } |
| 11672 | if ((0, _definition.isListType)(returnType)) { |
| 11673 | return completeListValue( |
| 11674 | exeContext, |
| 11675 | returnType, |
| 11676 | fieldNodes, |
| 11677 | info, |
| 11678 | path3, |
| 11679 | result |
| 11680 | ); |
| 11681 | } |
| 11682 | if ((0, _definition.isLeafType)(returnType)) { |
| 11683 | return completeLeafValue(returnType, result); |
| 11684 | } |
| 11685 | if ((0, _definition.isAbstractType)(returnType)) { |
| 11686 | return completeAbstractValue( |
| 11687 | exeContext, |
| 11688 | returnType, |
| 11689 | fieldNodes, |
| 11690 | info, |
| 11691 | path3, |
| 11692 | result |
| 11693 | ); |
| 11694 | } |
| 11695 | if ((0, _definition.isObjectType)(returnType)) { |
| 11696 | return completeObjectValue( |
| 11697 | exeContext, |
| 11698 | returnType, |
| 11699 | fieldNodes, |
| 11700 | info, |
| 11701 | path3, |
| 11702 | result |
| 11703 | ); |
| 11704 | } |
| 11705 | (0, _invariant.invariant)( |
| 11706 | false, |
no test coverage detected