src/Executor/ReferenceExecutor.php
private function resolveOrError($fieldDef, $fieldNode, $resolveFn, $source, $context, $info)
    {
        try {
            // Build hash of arguments from the field.arguments AST, using the
            // variables scope to fulfill any variable references.
            $args = Values::getArgumentValues(
                $fieldDef,
                $fieldNode,
                $this->exeContext->variableValues
            );

            return $resolveFn($source, $args, $context, $info);
        } catch (Exception $error) {
            return $error;
        } catch (Throwable $error) {
            return $error;
        }
    }
private function resolveOrError($fieldDef, $fieldNode, $resolveFn, $source, $context, $info)
    {
        try {
            // Build hash of arguments from the field.arguments AST, using the
            // variables scope to fulfill any variable references.
            $args = Values::getArgumentValues(
                $fieldDef,
                $fieldNode,
                $this->exeContext->variableValues
            );

            return $resolveFn($source, $args, $context, $info);
        } catch (Exception $error) {
            return $error;
        } catch (Throwable $error) {
            return $error;
        }
    }
private function resolveOrError ( $ fieldDef , $ fieldNode , $ resolveFn , $ source , $ context , $ info ) { try { // Build hash of arguments from the field.arguments AST, using the // variables scope to fulfill any variable references. $ args = Values :: getArgumentValues ( $ fieldDef , $ fieldNode , $ this -> exeContext -> variableValues ) ; return $ resolveFn ( $ source , $ args , $ context , $ info ) ; } catch ( Exception $ error ) { return $ error ; } catch ( Throwable $ error ) { return $ error ; } }
Isolates the "ReturnOrAbrupt" behavior to not de-opt the `resolveField`
function. Returns the result of resolveFn or the abrupt-return Error object.

@param FieldDefinition $fieldDef
@param FieldNode       $fieldNode
@param callable        $resolveFn
@param mixed           $source
@param mixed           $context
@param ResolveInfo     $info

@return Throwable|Promise|mixed
Isolates the ReturnOrAbrupt behavior to not de - opt the resolveField function . Returns the result of resolveFn or the abrupt - return Error object .