Skip to content

Commit 7de29db

Browse files
author
Bertrand Dunogier
committed
Compile graphql types after schema generation (#59)
1 parent 5269057 commit 7de29db

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Command/GeneratePlatformSchemaCommand.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Symfony\Component\Console\Command\Command;
1111
use Symfony\Component\Console\Input\InputInterface;
1212
use Symfony\Component\Console\Input\InputOption;
13+
use Symfony\Component\Console\Input\StringInput;
1314
use Symfony\Component\Console\Output\OutputInterface;
1415
use Symfony\Component\Filesystem\Filesystem;
1516
use Symfony\Component\Yaml\Yaml;
@@ -66,5 +67,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
6667
$output->writeln("\n# $type\n$yaml\n");
6768
}
6869
}
70+
71+
$output->writeln('');
72+
$this->compileTypes($output);
73+
}
74+
75+
private function compileTypes(OutputInterface $output)
76+
{
77+
$command = $this->getApplication()->find('graphql:compile');
78+
$command->run(new StringInput('graphql:compile'), $output);
6979
}
7080
}

0 commit comments

Comments
 (0)