diff --git a/src/Type/EntityTypeAbstractFactory.php b/src/Type/EntityTypeAbstractFactory.php index 799fc51..ca1ca19 100644 --- a/src/Type/EntityTypeAbstractFactory.php +++ b/src/Type/EntityTypeAbstractFactory.php @@ -315,7 +315,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o } $instance = new EntityType([ - 'name' => $requestedName . '_' . $options['hydrator_section'], + 'name' => str_replace('\\', '_', $requestedName) . '__' . $options['hydrator_section'], 'description' => 'testing description', 'fields' => function () use ($fields, $references) { foreach ($references as $referenceName => $resolve) { diff --git a/test/GraphQL/UserTest.php b/test/GraphQL/UserTest.php index 02f5277..94251ad 100644 --- a/test/GraphQL/UserTest.php +++ b/test/GraphQL/UserTest.php @@ -65,7 +65,7 @@ public function testPasswordFilter($schemaName, $context) $output = $result->toArray(); $this->assertEquals( - 'Cannot query field "password" on type "DbTest\Entity\User_' . $schemaName . '".', + 'Cannot query field "password" on type "DbTest_Entity_User__' . $schemaName . '".', $output['errors'][0]['message'] ); }