23 lines
779 B
PHP
23 lines
779 B
PHP
<?php
|
|
|
|
namespace KupShop\GraphQLBundle;
|
|
|
|
use KupShop\GraphQLBundle\DependencyInjection\GraphiQLEndpointWiringPass;
|
|
use KupShop\GraphQLBundle\DependencyInjection\GraphQLiteConfigWiringPass;
|
|
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
|
|
|
class GraphQLBundle extends Bundle
|
|
{
|
|
public function build(ContainerBuilder $container): void
|
|
{
|
|
parent::build($container);
|
|
if ($container->getParameter('kernel.environment') === 'dev') {
|
|
$container->addCompilerPass(new GraphiQLEndpointWiringPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -2);
|
|
}
|
|
|
|
$container->addCompilerPass(new GraphQLiteConfigWiringPass());
|
|
}
|
|
}
|