DependencyInjection/GraphQLExtension.php
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $this->config  = $this->processConfiguration($configuration, $configs);

        $preparedHeaders = [];
        $headers         = $this->config['response']['headers'] ? $this->config['response']['headers'] : $this->getDefaultHeaders();
        foreach ($headers as $header) {
            $preparedHeaders[$header['name']] = $header['value'];
        }

        $container->setParameter('graphql.response.headers', $preparedHeaders);
        $container->setParameter('graphql.schema_class', $this->config['schema_class']);
        $container->setParameter('graphql.schema_service', $this->config['schema_service']);
        $container->setParameter('graphql.logger', $this->config['logger']);
        $container->setParameter('graphql.max_complexity', $this->config['max_complexity']);
        $container->setParameter('graphql.response.json_pretty', $this->config['response']['json_pretty']);

        $container->setParameter('graphql.security.guard_config', [
            'field'     => $this->config['security']['guard']['field'],
            'operation' => $this->config['security']['guard']['operation']
        ]);

        $container->setParameter('graphql.security.black_list', $this->config['security']['black_list']);
        $container->setParameter('graphql.security.white_list', $this->config['security']['white_list']);


        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');
    }
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $this->config  = $this->processConfiguration($configuration, $configs);

        $preparedHeaders = [];
        $headers         = $this->config['response']['headers'] ? $this->config['response']['headers'] : $this->getDefaultHeaders();
        foreach ($headers as $header) {
            $preparedHeaders[$header['name']] = $header['value'];
        }

        $container->setParameter('graphql.response.headers', $preparedHeaders);
        $container->setParameter('graphql.schema_class', $this->config['schema_class']);
        $container->setParameter('graphql.schema_service', $this->config['schema_service']);
        $container->setParameter('graphql.logger', $this->config['logger']);
        $container->setParameter('graphql.max_complexity', $this->config['max_complexity']);
        $container->setParameter('graphql.response.json_pretty', $this->config['response']['json_pretty']);

        $container->setParameter('graphql.security.guard_config', [
            'field'     => $this->config['security']['guard']['field'],
            'operation' => $this->config['security']['guard']['operation']
        ]);

        $container->setParameter('graphql.security.black_list', $this->config['security']['black_list']);
        $container->setParameter('graphql.security.white_list', $this->config['security']['white_list']);


        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');
    }
{@inheritdoc}