当我尝试使用Spring Boot构建graphql时,出现以下问题
public function __construct(ValidityEndHandler $validityEndHandler, InventoryRepository $repository)
{
$this->validityEndHandler = $validityEndHandler;
$this->repository = $repository;
parent::__construct();
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$inventory = $this->repository->yourRequest();
// pass the mailer service you need directly to ValidityHandler and send only $inventory as a parameter
$this->validityEndHandler->sendReminderMail($inventory);
$output->writeln('Emails werden gesendet');
}