Youshido\GraphQL\Execution\Processor::resolveObject PHP Method

resolveObject() protected method

protected resolveObject ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue, $fromUnion = false )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface
    protected function resolveObject(FieldInterface $field, AstFieldInterface $ast, $parentValue, $fromUnion = false)
    {
        if (!$fromUnion) {
            $resolvedValue = $this->doResolve($field, $ast, $parentValue);
        } else {
            $resolvedValue = $parentValue;
        }
        $this->resolveValidator->assertValidResolvedValueForField($field, $resolvedValue);
        if (null === $resolvedValue) {
            return null;
        }
        /** @var AbstractObjectType $type */
        $type = $field->getType()->getNullableType();
        try {
            return $this->collectResult($field, $type, $ast, $resolvedValue);
        } catch (\Exception $e) {
            return null;
        }
    }