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

resolveScalar() protected method

protected resolveScalar ( Youshido\GraphQL\Field\FieldInterface $field, Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface $ast, $parentValue )
$field Youshido\GraphQL\Field\FieldInterface
$ast Youshido\GraphQL\Parser\Ast\Interfaces\FieldInterface
    protected function resolveScalar(FieldInterface $field, AstFieldInterface $ast, $parentValue)
    {
        $resolvedValue = $this->doResolve($field, $ast, $parentValue);
        $this->resolveValidator->assertValidResolvedValueForField($field, $resolvedValue);
        /** @var AbstractScalarType $type */
        $type = $field->getType()->getNullableType();
        return $type->serialize($resolvedValue);
    }