src/Schema/Types/Scalars/Date.php
public function serialize($value): string
    {
        if ($value instanceof Carbon) {
            return $value->toDateString();
        }

        return $this->tryParsingDate($value, InvariantViolation::class)
            ->toDateString();
    }
public function serialize($value): string
    {
        if ($value instanceof Carbon) {
            return $value->toDateString();
        }

        return $this->tryParsingDate($value, InvariantViolation::class)
            ->toDateString();
    }
public function serialize ( $ value ) : string { if ( $ value instanceof Carbon ) { return $ value -> toDateString ( ) ; } return $ this -> tryParsingDate ( $ value , InvariantViolation :: class ) -> toDateString ( ) ; }
Serialize an internal value, ensuring it is a valid date string.

@param  \Carbon\Carbon|string  $value
@return string
Serialize an internal value ensuring it is a valid date string .