Lighthouse tutorial говорит, что при доступе к /graphql-playground будет отображаться представление GraphQL Playground, но выдается исключение. Как я могу это исправить?
при доступе к /graphql-playground возникает это исключение:
InvalidArgumentException(code: 0): No hint path defined for [graphql-playground]
Исключение выдано из:
protected function parseNamespaceSegments($name)
{
$segments = explode(static::HINT_PATH_DELIMITER, $name);
if (count($segments) !== 2) {
throw new InvalidArgumentException("View [{$name}] has an invalid name.");
}
if (! isset($this->hints[$segments[0]])) { // <- this line
throw new InvalidArgumentException("No hint path defined for [{$segments[0]}].");
}
return $segments;
}
Я попробовал это:
- Добавить ServiceProvider в config.app.provider
'providers' => [
//
\MLL\GraphQLPlayground\GraphQLPlaygroundServiceProvider::class,
],
- опубликовать пакет
php artisan vendor:publish --tag=graphql-playground-view
php artisan vendor:publish --tag=graphql-playground-config
php artisan vendor:publish --provider="MLL\GraphQLPlayground\GraphQLPlaygroundServiceProvider"