Skip to content

Commit

Permalink
use namespace for instance key
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissm79 committed Aug 27, 2016
1 parent 8919ca2 commit 6e3f010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/LaravelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function boot()
$this->loadViewsFrom(realpath(__DIR__.'/Support/Console/Commands/stubs'), 'lighthouse');

if (config('lighthouse.controller')) {
require_once __DIR__.'/Support/Http/routes.php';
require __DIR__.'/Support/Http/routes.php';
}

$this->registerNodes();
Expand Down Expand Up @@ -78,7 +78,7 @@ protected function registerSchema()
if (is_callable($schema)) {
$schema();
} elseif (is_string($schema)) {
require_once $schema;
require $schema;
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/Schema/Registrars/ConnectionRegistrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Nuwave\Lighthouse\Schema\Registrars;

use ReflectionClass;
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\InterfaceType;
use Nuwave\Lighthouse\Support\Definition\RelayConnectionType;
Expand Down Expand Up @@ -111,7 +112,7 @@ public function getInstance($name, ObjectType $nodeType)
protected function instanceName($name)
{
if ($name instanceof Connection) {
return strtolower(get_class($name));
return (new ReflectionClass($name))->getName();
}

return $name;
Expand Down

0 comments on commit 6e3f010

Please sign in to comment.