Files
kupshop/bundles/KupShop/GraphQLBundle/DependencyInjection/GraphiQLEndpointWiringPass.php
2025-08-02 16:30:27 +02:00

21 lines
752 B
PHP

<?php
namespace KupShop\GraphQLBundle\DependencyInjection;
use KupShop\GraphQLBundle\GraphiQL\EndpointResolver;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
class GraphiQLEndpointWiringPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
$endPointDefinition = new Definition(EndpointResolver::class);
$endPointDefinition->addArgument(new Reference('request_stack'));
$container->setDefinition('overblog_graphiql.controller.graphql.endpoint', $endPointDefinition);
}
}