Category: nullable

Cannot return null for non-nullable field on API platform and graphql

I have an “user” entity with an unmapped property like this : namespace AppEntityUser; // … /** * @var string * @Groups({“readAnnounce”, “readUser”}) */ private $lastUrlImageProfilValid; /** * @return string */ public function getLastUrlImageProfilValid() { foreach ($this->imageProfil as $image){ if…