Skip to content

Commit e333ee7

Browse files
authored
Merge pull request #41 from moufmouf/root_type_mapper_factory
Adapting code to new root type mapper factory
2 parents c133ad5 + 0af5f88 commit e333ee7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

DependencyInjection/GraphqliteCompilerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public function process(ContainerBuilder $container)
245245
// Register graphql.queryprovider
246246
$this->mapAdderToTag('graphql.queryprovider', 'addQueryProvider', $container, $schemaFactory);
247247
$this->mapAdderToTag('graphql.queryprovider_factory', 'addQueryProviderFactory', $container, $schemaFactory);
248-
$this->mapAdderToTag('graphql.root_type_mapper', 'addRootTypeMapper', $container, $schemaFactory);
248+
$this->mapAdderToTag('graphql.root_type_mapper_factory', 'addRootTypeMapperFactory', $container, $schemaFactory);
249249
$this->mapAdderToTag('graphql.parameter_middleware', 'addParameterMiddleware', $container, $schemaFactory);
250250
$this->mapAdderToTag('graphql.field_middleware', 'addFieldMiddleware', $container, $schemaFactory);
251251
$this->mapAdderToTag('graphql.type_mapper', 'addTypeMapper', $container, $schemaFactory);

DependencyInjection/GraphqliteExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace TheCodingMachine\Graphqlite\Bundle\DependencyInjection;
55

66

7+
use TheCodingMachine\GraphQLite\Mappers\Root\RootTypeMapperFactoryInterface;
78
use function array_map;
89
use GraphQL\Error\Debug;
910
use GraphQL\Server\ServerConfig;
@@ -75,6 +76,8 @@ public function load(array $configs, ContainerBuilder $container)
7576

7677
$container->registerForAutoconfiguration(ObjectType::class)
7778
->addTag('graphql.output_type');
79+
$container->registerForAutoconfiguration(RootTypeMapperFactoryInterface::class)
80+
->addTag('graphql.root_type_mapper_factory');
7881
}
7982

8083
private function getNamespaceDir(string $namespace): string

0 commit comments

Comments
 (0)