diff --git a/website/docs/other-frameworks.mdx b/website/docs/other-frameworks.mdx index 9402451116..4957449cc7 100644 --- a/website/docs/other-frameworks.mdx +++ b/website/docs/other-frameworks.mdx @@ -38,8 +38,8 @@ use TheCodingMachine\GraphQLite\SchemaFactory; // $cache is a PSR-16 compatible cache // $container is a PSR-11 compatible container $factory = new SchemaFactory($cache, $container); -$factory->addControllerNamespace('App\\Controllers\\') - ->addTypeNamespace('App\\'); +$factory->addControllerNamespace('App\\Controllers') + ->addTypeNamespace('App'); $schema = $factory->createSchema(); ``` @@ -109,8 +109,8 @@ use Kcs\ClassFinder\Finder\ComposerFinder; use TheCodingMachine\GraphQLite\SchemaFactory; $factory = new SchemaFactory($cache, $container); -$factory->addControllerNamespace('App\\Controllers\\') - ->addTypeNamespace('App\\') +$factory->addControllerNamespace('App\\Controllers') + ->addTypeNamespace('App') ->setFinder( (new ComposerFinder())->useAutoloading(false) ); @@ -132,8 +132,8 @@ use TheCodingMachine\GraphQLite\Context\Context; // $cache is a PSR-16 compatible cache. // $container is a PSR-11 compatible container. $factory = new SchemaFactory($cache, $container); -$factory->addControllerNamespace('App\\Controllers\\') - ->addTypeNamespace('App\\'); +$factory->addControllerNamespace('App\\Controllers') + ->addTypeNamespace('App'); $schema = $factory->createSchema(); @@ -290,8 +290,8 @@ return new Picotainer([ Schema::class => function(ContainerInterface $container) { // The magic happens here. We create a schema using GraphQLite SchemaFactory. $factory = new SchemaFactory($container->get(CacheInterface::class), $container); - $factory->addControllerNamespace('App\\Controllers\\'); - $factory->addTypeNamespace('App\\'); + $factory->addControllerNamespace('App\\Controllers'); + $factory->addTypeNamespace('App'); return $factory->createSchema(); } ]); diff --git a/website/versioned_docs/version-7.0.0/other-frameworks.mdx b/website/versioned_docs/version-7.0.0/other-frameworks.mdx index 64806bd84a..16eb20e745 100644 --- a/website/versioned_docs/version-7.0.0/other-frameworks.mdx +++ b/website/versioned_docs/version-7.0.0/other-frameworks.mdx @@ -38,8 +38,8 @@ use TheCodingMachine\GraphQLite\SchemaFactory; // $cache is a PSR-16 compatible cache // $container is a PSR-11 compatible container $factory = new SchemaFactory($cache, $container); -$factory->addControllerNamespace('App\\Controllers\\') - ->addTypeNamespace('App\\'); +$factory->addControllerNamespace('App\\Controllers') + ->addTypeNamespace('App'); $schema = $factory->createSchema(); ``` @@ -112,8 +112,8 @@ use TheCodingMachine\GraphQLite\Context\Context; // $cache is a PSR-16 compatible cache. // $container is a PSR-11 compatible container. $factory = new SchemaFactory($cache, $container); -$factory->addControllerNamespace('App\\Controllers\\') - ->addTypeNamespace('App\\'); +$factory->addControllerNamespace('App\\Controllers') + ->addTypeNamespace('App'); $schema = $factory->createSchema(); @@ -266,8 +266,8 @@ return new Picotainer([ Schema::class => function(ContainerInterface $container) { // The magic happens here. We create a schema using GraphQLite SchemaFactory. $factory = new SchemaFactory($container->get(CacheInterface::class), $container); - $factory->addControllerNamespace('App\\Controllers\\'); - $factory->addTypeNamespace('App\\'); + $factory->addControllerNamespace('App\\Controllers'); + $factory->addTypeNamespace('App'); return $factory->createSchema(); } ]);