DependencyInjection/Compiler/GraphQlCompilerPass.php
private function processSecurityGuard(ContainerBuilder $container)
    {
        $guardConfig = $container->getParameter('graphql.security.guard_config');
        $whiteList   = $container->getParameter('graphql.security.white_list');
        $blackList   = $container->getParameter('graphql.security.black_list');

        if ((!$guardConfig['field'] && !$guardConfig['operation']) && ($whiteList || $blackList)) {
            if ($whiteList && $blackList) {
                throw new \RuntimeException('Configuration error: Only one white or black list allowed');
            }

            $this->addListVoter($container, BlacklistVoter::class, $blackList);
            $this->addListVoter($container, WhitelistVoter::class, $whiteList);
        }
    }
private function processSecurityGuard(ContainerBuilder $container)
    {
        $guardConfig = $container->getParameter('graphql.security.guard_config');
        $whiteList   = $container->getParameter('graphql.security.white_list');
        $blackList   = $container->getParameter('graphql.security.black_list');

        if ((!$guardConfig['field'] && !$guardConfig['operation']) && ($whiteList || $blackList)) {
            if ($whiteList && $blackList) {
                throw new \RuntimeException('Configuration error: Only one white or black list allowed');
            }

            $this->addListVoter($container, BlacklistVoter::class, $blackList);
            $this->addListVoter($container, WhitelistVoter::class, $whiteList);
        }
    }
@param ContainerBuilder $container

@throws \Exception