6 declare(strict_types=1);
24 private $schemaFactory;
29 private $outputMapper;
46 $this->schemaFactory = $schemaFactory;
47 $this->outputMapper = $outputMapper;
56 $schema = $this->schemaFactory->create(
58 'query' => $this->outputMapper->getOutputType(
'Query'),
59 'mutation' => $this->outputMapper->getOutputType(
'Mutation'),
60 'typeLoader' =>
function (
$name) {
61 return $this->outputMapper->getOutputType(
$name);
63 'types' =>
function () {
65 $typesImplementors = [];
66 foreach ($this->config->getDeclaredTypeNames() as
$name) {
67 $typesImplementors [] = $this->outputMapper->getOutputType(
$name);
69 return $typesImplementors;
__construct(SchemaFactory $schemaFactory, OutputMapper $outputMapper, ConfigInterface $config)
if(!isset($_GET['name'])) $name