|
8 | 8 | use GraphQL\Type\Schema;
|
9 | 9 | use Overblog\GraphQLBundle\CacheWarmer\CompileCacheWarmer;
|
10 | 10 | use Overblog\GraphQLBundle\Config\Processor\BuilderProcessor;
|
| 11 | +use Overblog\GraphQLBundle\Definition\Builder\SchemaBuilder; |
11 | 12 | use Overblog\GraphQLBundle\Error\ErrorHandler;
|
12 | 13 | use Overblog\GraphQLBundle\Error\UserWarning;
|
13 | 14 | use Overblog\GraphQLBundle\Event\Events;
|
|
16 | 17 | use Overblog\GraphQLBundle\EventListener\ErrorHandlerListener;
|
17 | 18 | use Overblog\GraphQLBundle\EventListener\ErrorLoggerListener;
|
18 | 19 | use Overblog\GraphQLBundle\EventListener\TypeDecoratorListener;
|
| 20 | +use Overblog\GraphQLBundle\Request\Executor; |
19 | 21 | use Symfony\Component\Config\FileLocator;
|
20 | 22 | use Symfony\Component\DependencyInjection\ContainerBuilder;
|
21 | 23 | use Symfony\Component\DependencyInjection\ContainerInterface;
|
@@ -74,11 +76,14 @@ public function getConfiguration(array $config, ContainerBuilder $container)
|
74 | 76 | private function loadConfigFiles(ContainerBuilder $container): void
|
75 | 77 | {
|
76 | 78 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
77 |
| - $loader->load('services.yml'); |
78 |
| - $loader->load('graphql_types.yml'); |
79 |
| - $loader->load('graphql_resolvers.yml'); |
80 |
| - $loader->load('expression_language_functions.yml'); |
81 |
| - $loader->load('definition_config_processors.yml'); |
| 79 | + $loader->load('services.yaml'); |
| 80 | + $loader->load('commands.yaml'); |
| 81 | + $loader->load('listeners.yaml'); |
| 82 | + $loader->load('graphql_types.yaml'); |
| 83 | + $loader->load('graphql_resolvers.yaml'); |
| 84 | + $loader->load('expression_language_functions.yaml'); |
| 85 | + $loader->load('definition_config_processors.yaml'); |
| 86 | + $loader->load('aliases.yaml'); |
82 | 87 | }
|
83 | 88 |
|
84 | 89 | private function setCompilerCacheWarmer(array $config, ContainerBuilder $container): void
|
@@ -161,7 +166,7 @@ private function treatConfigs(array $configs, ContainerBuilder $container, $forc
|
161 | 166 |
|
162 | 167 | private function setSecurity(array $config, ContainerBuilder $container): void
|
163 | 168 | {
|
164 |
| - $executorDefinition = $container->getDefinition($this->getAlias().'.request_executor'); |
| 169 | + $executorDefinition = $container->getDefinition(Executor::class); |
165 | 170 | if ($config['security']['enable_introspection']) {
|
166 | 171 | $executorDefinition->addMethodCall('enableIntrospectionQuery');
|
167 | 172 | } else {
|
@@ -206,14 +211,14 @@ private function setErrorHandler(array $config, ContainerBuilder $container): vo
|
206 | 211 |
|
207 | 212 | private function setSchemaBuilderArguments(array $config, ContainerBuilder $container): void
|
208 | 213 | {
|
209 |
| - $container->getDefinition($this->getAlias().'.schema_builder') |
| 214 | + $container->getDefinition(SchemaBuilder::class) |
210 | 215 | ->replaceArgument(1, $config['definitions']['config_validation']);
|
211 | 216 | }
|
212 | 217 |
|
213 | 218 | private function setSchemaArguments(array $config, ContainerBuilder $container): void
|
214 | 219 | {
|
215 | 220 | if (isset($config['definitions']['schema'])) {
|
216 |
| - $executorDefinition = $container->getDefinition($this->getAlias().'.request_executor'); |
| 221 | + $executorDefinition = $container->getDefinition(Executor::class); |
217 | 222 | $typeDecoratorListenerDefinition = $container->getDefinition(TypeDecoratorListener::class);
|
218 | 223 |
|
219 | 224 | foreach ($config['definitions']['schema'] as $schemaName => $schemaConfig) {
|
|
0 commit comments