There is no problem not worth solving, and no technology not worth learning!
In Laravel Framework 6.20.40, Nuwave/Lighthouse V5.33.1, an error is reported: Argument 1 Passed to App\\Exceptions\\Handler::report() must be an instance of exception, instance of typeError given, called in E:\WWRoot\\Object\Vendor\\nuwave\Lighthouse\src\execution\\reportingErrorHandler.php on line 39
1. Execute request: “query”: “query{ onlineStoreEtheme(themeid: “vogue”){ id editable createAt PublishAt }”, when the response Argument 1 Passed to App\\Exceptions\\Handler::report() must be an instance of exception, instance of typeError given, called in e:\\wwwroot\\object\\vendor\\nuwave\lighthouse\src\execution\reportingErrorHandler.php on line 39. as shown in Figure 1
Figure 1
2. Check the code:\app\exceptions\handler.php:40 . as shown in Figure 2
Figure 2
/**
* Report or log an exception.
*
* @param \Exception $exception
* @return void
* @throws Exception
*/
public function report(Exception $exception)
{
// 1/10的概率上报到sentry,防止sentry增长过快
if (app()->environment() === "production"
&& app()->bound('sentry')
&& $this->shouldReport($exception)
&& mt_rand(0, 100) < 10
) {
\Sentry\withScope(function (\Sentry\State\Scope $scope) use ($exception): void {
$scope->setTag('app.name', config('app.name'));
\Sentry\captureException($exception);
});
}
if (($exception instanceof BusinessException)) {
BusinessException::notify($exception);
}
parent::report($exception);
}
3. Check the code: /vendor/nuwave/lighthouse/src/execution/reportingErrorHandler.php:39 . There are comments on line 38: @phpsstan-ignore-next-line Laravel 7 was limited to accepting \Exception only. as shown in Figure 3
Figure 3
public function __invoke(?Error $error, Closure $next): ?array
{
if (null === $error) {
return $next(null);
}
// Client-safe errors are assumed to be something that a client can handle
// or is expected to happen, e.g. wrong syntax, authentication or validation
if ($error->isClientSafe()) {
return $next($error);
}
$previous = $error->getPrevious();
if (null !== $previous) {
// @phpstan-ignore-next-line Laravel versions prior to 7 are limited to accepting \Exception
$this->exceptionHandler->report($previous);
}
return $next($error);
}
4. The version of the Laravel framework of the current program: Laravel Framework 6.20.40. The version of Nuwave/Lighthouse: v5.33.1.
PS E:\wwwroot\object> composer show nuwave/lighthouse -i
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
name : nuwave/lighthouse
descrip. : A framework for serving GraphQL from Laravel
keywords : graphql, laravel, laravel-graphql
versions : * v5.33.1
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://lighthouse-php.com
source : [git] https://github.com/nuwave/lighthouse.git 4ff54df1a6e87fd4e753f4633cc9949f4664ae7d
dist : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/4ff54df1a6e87fd4e753f4633cc9949f4664ae7d 4ff54df1a6e87fd4e753f4633cc9949f4664ae7d
path : E:\wwwroot\object\vendor\nuwave\lighthouse
names : nuwave/lighthouse
5. Open the URL: https://github.com/nuwave/lighthouse/blob/v5.1.0/src/execution/reportingErrorHandler.php , you can be sure that this problem is no longer supported by Laravel 6 since version: v5.1.0. Decided to fall back to the previous version of this version: v5.0.2. as shown in Figure 4
Figure 4
public function __invoke(?Error $error, Closure $next): ?array
{
if ($error === null) {
return $next(null);
}
// Client-safe errors are assumed to be something that a client can handle
// or is expected to happen, e.g. wrong syntax, authentication or validation
if ($error->isClientSafe()) {
return $next($error);
}
$this->exceptionHandler->report(
// @phpstan-ignore-next-line TODO remove when supporting Laravel 7 and upwards
$error->getPrevious()
);
return $next($error);
}
6. Execute the composer remove nuwave/lighthouse command to uninstall nuwave/lighthouse. as shown in Figure 5
Figure 5
PS E:\wwwroot\object> composer remove nuwave/lighthouse
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
./composer.json has been updated
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
Running composer update nuwave/lighthouse
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 6 removals
- Removing haydenpierce/class-finder (0.4.3)
- Removing laragraph/utils (v1.1.1)
- Removing mll-lab/laravel-graphql-playground (v2.5.0)
- Removing nuwave/lighthouse (v5.33.1)
- Removing thecodingmachine/safe (v1.3.3)
- Removing webonyx/graphql-php (v14.11.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 6 removals
- Removing webonyx/graphql-php (v14.11.3)
- Removing thecodingmachine/safe (v1.3.3)
- Removing nuwave/lighthouse (v5.33.1)
- Removing mll-lab/laravel-graphql-playground (v2.5.0)
- Removing laragraph/utils (v1.1.1)
- Removing haydenpierce/class-finder (0.4.3)
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Google\Task\Composer::cleanup
Class Tests\Feature\LoginApiPostCartPaymentTest located in E:/wwwroot/object/tests\Feature\ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Feature\LoginApiPostCartTest located in E:/wwwroot/object/tests\Feature\ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Feature\LoginGetPaymentTest located in E:/wwwroot/object/tests\Feature\PaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Sofa\Eloquence\Searchable\Searchable located in E:/wwwroot/object/vendor/sofa/eloquence-base/src\Contracts\Searchable\Searchable.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\RecommendedProduct\Database\Seeders\LastSaleDatabaseSeeder located in E:/wwwroot/object/Modules\LastSale\Database\Seeders\LastSaleDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\CheckoutPageImage\Database\Seeders\PixelConversionDatabaseSeeder located in E:/wwwroot/object/Modules\PixelConversion\Database\Seeders\PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\ThemeStore\Tests\FactoryTest located in E:/wwwroot/object/Modules\ThemeStore\Tests\Unit\FactoryTest.php does not comply with psr-4 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: arubacao/asset-cdn
Discovered Package: axlon/laravel-postal-code-validation
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: beyondcode/laravel-er-diagram-generator
Discovered Package: boaideas/laravel-cli-create-user
Discovered Package: cviebrock/eloquent-sluggable
Discovered Package: dingo/api
Discovered Package: fideloper/proxy
Discovered Package: genealabs/laravel-model-caching
Discovered Package: igaster/laravel-theme
Discovered Package: ignited/laravel-omnipay
Discovered Package: intervention/image
Discovered Package: jenssegers/agent
Discovered Package: jgrossi/corcel
Discovered Package: laravel/passport
Discovered Package: laravel/scout
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: maatwebsite/excel
Discovered Package: mpociot/laravel-apidoc-generator
Discovered Package: nesbot/carbon
Discovered Package: neobject/facebook-conversions-api
Discovered Package: nunomaduro/collision
Discovered Package: nwidart/laravel-modules
Discovered Package: orangehill/iseed
Discovered Package: overtrue/laravel-pinyin
Discovered Package: overtrue/laravel-wechat
Discovered Package: s-ichikawa/laravel-sendgrid-driver
Discovered Package: sentry/sentry-laravel
Discovered Package: socialiteproviders/manager
Discovered Package: sofa/eloquence-base
Discovered Package: sofa/eloquence-mutable
Discovered Package: spatie/laravel-activitylog
Discovered Package: spatie/laravel-permission
Discovered Package: spatie/laravel-query-builder
Discovered Package: spatie/laravel-sitemap
Discovered Package: tamayo/laravel-scout-elastic
Discovered Package: torann/geoip
Package manifest generated successfully.
114 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
7. Execute the composer require nuwave/lighthouse:5.0.2 command to install nuwave/lighthouse. Specify the exact version of the package. as shown in Figure 6
Figure 6
PS E:\wwwroot\object> composer require nuwave/lighthouse:5.0.2
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
./composer.json has been updated
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
Running composer update nuwave/lighthouse
Loading composer repositories with package information
Updating dependencies
Lock file operations: 5 installs, 0 updates, 0 removals
- Locking haydenpierce/class-finder (0.4.3)
- Locking laragraph/utils (v1.3.0)
- Locking nuwave/lighthouse (v5.0.2)
- Locking thecodingmachine/safe (v1.3.3)
- Locking webonyx/graphql-php (v14.11.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
- Downloading laragraph/utils (v1.3.0)
- Downloading nuwave/lighthouse (v5.0.2)
- Installing webonyx/graphql-php (v14.11.3): Extracting archive
- Installing thecodingmachine/safe (v1.3.3): Extracting archive
- Installing laragraph/utils (v1.3.0): Extracting archive
- Installing haydenpierce/class-finder (0.4.3): Extracting archive
- Installing nuwave/lighthouse (v5.0.2): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Google\Task\Composer::cleanup
Class Tests\Feature\LoginApiPostCartPaymentTest located in E:/wwwroot/object/tests\Feature\ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Feature\LoginApiPostCartTest located in E:/wwwroot/object/tests\Feature\ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Feature\LoginGetPaymentTest located in E:/wwwroot/object/tests\Feature\PaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Sofa\Eloquence\Searchable\Searchable located in E:/wwwroot/object/vendor/sofa/eloquence-base/src\Contracts\Searchable\Searchable.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\RecommendedProduct\Database\Seeders\LastSaleDatabaseSeeder located in E:/wwwroot/object/Modules\LastSale\Database\Seeders\LastSaleDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\CheckoutPageImage\Database\Seeders\PixelConversionDatabaseSeeder located in E:/wwwroot/object/Modules\PixelConversion\Database\Seeders\PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\ThemeStore\Tests\FactoryTest located in E:/wwwroot/object/Modules\ThemeStore\Tests\Unit\FactoryTest.php does not comply with psr-4 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: arubacao/asset-cdn
Discovered Package: axlon/laravel-postal-code-validation
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: beyondcode/laravel-er-diagram-generator
Discovered Package: boaideas/laravel-cli-create-user
Discovered Package: cviebrock/eloquent-sluggable
Discovered Package: dingo/api
Discovered Package: fideloper/proxy
Discovered Package: genealabs/laravel-model-caching
Discovered Package: igaster/laravel-theme
Discovered Package: ignited/laravel-omnipay
Discovered Package: intervention/image
Discovered Package: jenssegers/agent
Discovered Package: jgrossi/corcel
Discovered Package: laravel/passport
Discovered Package: laravel/scout
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: maatwebsite/excel
Discovered Package: mpociot/laravel-apidoc-generator
Discovered Package: nesbot/carbon
Discovered Package: neobject/facebook-conversions-api
Discovered Package: nunomaduro/collision
Discovered Package: nuwave/lighthouse
Discovered Package: nwidart/laravel-modules
Discovered Package: orangehill/iseed
Discovered Package: overtrue/laravel-pinyin
Discovered Package: overtrue/laravel-wechat
Discovered Package: s-ichikawa/laravel-sendgrid-driver
Discovered Package: sentry/sentry-laravel
Discovered Package: socialiteproviders/manager
Discovered Package: sofa/eloquence-base
Discovered Package: sofa/eloquence-mutable
Discovered Package: spatie/laravel-activitylog
Discovered Package: spatie/laravel-permission
Discovered Package: spatie/laravel-query-builder
Discovered Package: spatie/laravel-sitemap
Discovered Package: tamayo/laravel-scout-elastic
Discovered Package: torann/geoip
Package manifest generated successfully.
116 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PS E:\wwwroot\object> composer show nuwave/lighthouse -i
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
name : nuwave/lighthouse
descrip. : A framework for serving GraphQL from Laravel
keywords : graphql, laravel, laravel-graphql
versions : * v5.0.2
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://lighthouse-php.com
source : [git] https://github.com/nuwave/lighthouse.git d3921f093ccf608b52a92879dd24915317cefa65
dist : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/d3921f093ccf608b52a92879dd24915317cefa65 d3921f093ccf608b52a92879dd24915317cefa65
path : E:\wwwroot\object\vendor\nuwave\lighthouse
names : nuwave/lighthouse
support
issues : https://github.com/nuwave/lighthouse/issues
source : https://github.com/nuwave/lighthouse
autoload
psr-4
Nuwave\Lighthouse\ => src/
requires
ext-json *
haydenpierce/class-finder ^0.4
illuminate/auth 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/bus 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/contracts 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/http 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/pagination 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/queue 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/routing 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/support 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
illuminate/validation 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
laragraph/utils ^1
php >= 7.2
thecodingmachine/safe ^1
webonyx/graphql-php ^14.2
requires (dev)
bensampo/laravel-enum ^1.28.3 || ^2 || ^3
ergebnis/composer-normalize ^2.2.2
laravel/framework 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
laravel/legacy-factories ^1.0
laravel/lumen-framework 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8
laravel/scout ^7 || ^8
mll-lab/graphql-php-scalars ^4
mockery/mockery ^1.0
nunomaduro/larastan ^0.6
orchestra/testbench 3.6.* || 3.7.* || 3.8.* || 3.9.* || ^4 || ^5 || ^6
phpbench/phpbench ^0.17
phpstan/phpstan-mockery ^0.12.5
phpunit/phpunit ^7.5 || ^8.4
predis/predis ^1.1
pusher/pusher-php-server ^3.2
rector/rector ^0.7.64
thecodingmachine/phpstan-safe-rule ^1.0
suggests
bensampo/laravel-enum Convenient enum definitions that can easily be registered in your Schema
laravel/scout Required for the @search directive
mll-lab/graphql-php-scalars Useful scalar types, required for @whereConditions
mll-lab/laravel-graphql-playground GraphQL IDE for better development workflow - integrated with Laravel
PS E:\wwwroot\object>
8. Execute request: “query”: “query{ onlineStoreEtheme(themeid: “vogue”){ id editable createAt PublishAt }”, when the response Argument 1 Passed to App\\Exceptions\\Handler::report() must be an instance of exception, instance of typeError given, called in e:\\wwwroot\\object\\vendor\\nuwave\lighthouse\src\execution\reportingErrorHandler.php on line 38.
9. Execute the composer remove nuwave/lighthouse command to uninstall nuwave/lighthouse. Execute the composer require nuwave/lighthouse:4.18.0 command to install nuwave/lighthouse. Specify the exact version of the package. Error still reported: Argument 1 Passed to App\\Exceptions\\Handler::report() must be an instance of exception, instance of typeError given, called in E:\WWRoot\\Object\Vendor\\nuwave\Lighthouse\src\execution\\reportingErrorHandler.php on line 25 .
<?php
namespace Nuwave\Lighthouse\Execution;
use Closure;
use GraphQL\Error\Error;
use Illuminate\Contracts\Debug\ExceptionHandler;
/**
* Report errors through the default exception handler configured in Laravel.
*/
class ReportingErrorHandler implements ErrorHandler
{
public static function handle(Error $error, Closure $next): array
{
// Client-safe errors are assumed to be something that a client can handle
// or is expected to happen, e.g. wrong syntax, authentication or validation
if ($error->isClientSafe()) {
return $next($error);
}
// TODO inject through constructor once handle is non-static
/** @var \Illuminate\Contracts\Debug\ExceptionHandler $reporter */
$reporter = app(ExceptionHandler::class);
$reporter->report($error->getPrevious()); // @phpstan-ignore-line TODO remove when supporting Laravel 7 and upwards
return $next($error);
}
}
10. Execute the composer remove nuwave/lighthouse command to uninstall nuwave/lighthouse. Execute the composer require nuwave/lighthouse:~4.10.1 command to install nuwave/lighthouse. The tilde operator ~4.10.1 is equivalent to >=4.10.1,<4.11.4.10.1 The version no longer exists: \vendor\nuwave\lighthouse\src\execution\reportingErrorHandler.php . Request again, 200 in response. Tip: Return value of modules\\themesetting\\bridge\\gasterLaravelTheme\\FilerawSectionSchemaloader::load() must be of the type array, bool returned. in line with expectations. At least when an exception occurs in the program, the specific abnormal situation can be clearly positioned. as shown in Figure 7
Figure 7
{
"errors": [
{
"debugMessage": "Return value of Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileRawSectionSchemaLoader::load() must be of the type array, bool returned",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"onlineStoreTheme"
],
"trace": [
{
"file": "E:\\wwwroot\\object\\Modules\\ThemeSetting\\Schema\\Builder\\ThemeBuilder.php",
"line": 86,
"call": "Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileRawSectionSchemaLoader::load('header')"
},
{
"file": "E:\\wwwroot\\object\\Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileThemeSchemaLoader.php",
"line": 43,
"call": "Modules\\ThemeSetting\\Schema\\Builder\\ThemeBuilder::build(array(1), instance of Modules\\ThemeSetting\\Schema\\Dto\\Theme)"
},
{
"file": "E:\\wwwroot\\object\\Modules\\ThemeStore\\Resolver\\OnlineStoreThemeResolver.php",
"line": 39,
"call": "Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileThemeSchemaLoader::loadSchema()"
},
{
"file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Schema\\Directives\\FieldDirective.php",
"line": 58,
"call": "Modules\\ThemeStore\\Resolver\\OnlineStoreThemeResolver::__invoke(null, array(2), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Schema\\Factories\\FieldFactory.php",
"line": 174,
"call": "Nuwave\\Lighthouse\\Schema\\Directives\\FieldDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}(null, array(1), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php",
"line": 632,
"call": "Nuwave\\Lighthouse\\Schema\\Factories\\FieldFactory::Nuwave\\Lighthouse\\Schema\\Factories\\{closure}(null, array(1), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php",
"line": 555,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveOrError(instance of GraphQL\\Type\\Definition\\FieldDefinition, instance of GraphQL\\Language\\AST\\FieldNode, instance of Closure, null, instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php",
"line": 1247,
"call": "GraphQL\\Executor\\ReferenceExecutor::resolveField(GraphQLType: Query, null, instance of ArrayObject(1), array(1))"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php",
"line": 257,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeFields(GraphQLType: Query, null, array(0), instance of ArrayObject(1))"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php",
"line": 208,
"call": "GraphQL\\Executor\\ReferenceExecutor::executeOperation(instance of GraphQL\\Language\\AST\\OperationDefinitionNode, null)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\Executor.php",
"line": 155,
"call": "GraphQL\\Executor\\ReferenceExecutor::doExecute()"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\GraphQL.php",
"line": 158,
"call": "GraphQL\\Executor\\Executor::promiseToExecute(instance of GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter, instance of GraphQL\\Type\\Schema, instance of GraphQL\\Language\\AST\\DocumentNode, null, instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\GraphQL.php",
"line": 90,
"call": "GraphQL\\GraphQL::promiseToExecute(instance of GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter, instance of GraphQL\\Type\\Schema, 'query{\n onlineStoreTheme(themeId: \"vogue\"){\n id\n editable\n createdAt\n publishAt\n }\n}', null, instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null, array(29))"
},
{
"file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php",
"line": 171,
"call": "GraphQL\\GraphQL::executeQuery(instance of GraphQL\\Type\\Schema, 'query{\n onlineStoreTheme(themeId: \"vogue\"){\n id\n editable\n createdAt\n publishAt\n }\n}', null, instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null, array(29))"
},
{
"file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php",
"line": 110,
"call": "Nuwave\\Lighthouse\\GraphQL::executeQuery('query{\n onlineStoreTheme(themeId: \"vogue\"){\n id\n editable\n createdAt\n publishAt\n }\n}', instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Controllers\\GraphQLController.php",
"line": 70,
"call": "Nuwave\\Lighthouse\\GraphQL::executeRequest(instance of Nuwave\\Lighthouse\\Execution\\LighthouseRequest)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php",
"line": 54,
"call": "Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController::query(instance of Nuwave\\Lighthouse\\Execution\\LighthouseRequest)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php",
"line": 45,
"call": "Illuminate\\Routing\\Controller::callAction('query', array(1))"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
"line": 219,
"call": "Illuminate\\Routing\\ControllerDispatcher::dispatch(instance of Illuminate\\Routing\\Route, instance of Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController, 'query')"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
"line": 176,
"call": "Illuminate\\Routing\\Route::runController()"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
"line": 681,
"call": "Illuminate\\Routing\\Route::run()"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 130,
"call": "Illuminate\\Routing\\Router::Illuminate\\Routing\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Middleware\\AcceptJson.php",
"line": 30,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AcceptJson::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 105,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
"line": 683,
"call": "Illuminate\\Pipeline\\Pipeline::then(instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
"line": 658,
"call": "Illuminate\\Routing\\Router::runRouteWithinStack(instance of Illuminate\\Routing\\Route, instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
"line": 624,
"call": "Illuminate\\Routing\\Router::runRoute(instance of Illuminate\\Http\\Request, instance of Illuminate\\Routing\\Route)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
"line": 613,
"call": "Illuminate\\Routing\\Router::dispatchToRoute(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
"line": 170,
"call": "Illuminate\\Routing\\Router::dispatch(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 130,
"call": "Illuminate\\Foundation\\Http\\Kernel::Illuminate\\Foundation\\Http\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php",
"line": 67,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
"line": 21,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
"line": 21,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php",
"line": 27,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode.php",
"line": 63,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\fideloper\\proxy\\src\\TrustProxies.php",
"line": 57,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Fideloper\\Proxy\\TrustProxies::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\dingo\\api\\src\\Http\\Middleware\\Request.php",
"line": 111,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 171,
"call": "Dingo\\Api\\Http\\Middleware\\Request::handle(instance of Illuminate\\Http\\Request, instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
"line": 105,
"call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
"line": 145,
"call": "Illuminate\\Pipeline\\Pipeline::then(instance of Closure)"
},
{
"file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
"line": 110,
"call": "Illuminate\\Foundation\\Http\\Kernel::sendRequestThroughRouter(instance of Illuminate\\Http\\Request)"
},
{
"file": "E:\\wwwroot\\object\\public\\index.php",
"line": 57,
"call": "Illuminate\\Foundation\\Http\\Kernel::handle(instance of Illuminate\\Http\\Request)"
}
]
}
],
"data": {
"onlineStoreTheme": null
}
}
11. The version of Nuwave/Lighthouse: 4.10.2. as shown in Figure 8
8
PS E:\wwwroot\object> composer require nuwave/lighthouse:~4.10.1
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
./composer.json has been updated
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
Running composer update nuwave/lighthouse
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking nuwave/lighthouse (4.10.2)
- Locking webonyx/graphql-php (v0.13.9)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Downloading nuwave/lighthouse (4.10.2)
- Installing webonyx/graphql-php (v0.13.9): Extracting archive
- Installing nuwave/lighthouse (4.10.2): Extracting archive
4 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Google\Task\Composer::cleanup
Class Tests\Feature\LoginApiPostCartPaymentTest located in E:/wwwroot/object/tests\Feature\ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Feature\LoginApiPostCartTest located in E:/wwwroot/object/tests\Feature\ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests\Feature\LoginGetPaymentTest located in E:/wwwroot/object/tests\Feature\PaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Sofa\Eloquence\Searchable\Searchable located in E:/wwwroot/object/vendor/sofa/eloquence-base/src\Contracts\Searchable\Searchable.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\RecommendedProduct\Database\Seeders\LastSaleDatabaseSeeder located in E:/wwwroot/object/Modules\LastSale\Database\Seeders\LastSaleDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\CheckoutPageImage\Database\Seeders\PixelConversionDatabaseSeeder located in E:/wwwroot/object/Modules\PixelConversion\Database\Seeders\PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules\ThemeStore\Tests\FactoryTest located in E:/wwwroot/object/Modules\ThemeStore\Tests\Unit\FactoryTest.php does not comply with psr-4 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: arubacao/asset-cdn
Discovered Package: axlon/laravel-postal-code-validation
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: beyondcode/laravel-er-diagram-generator
Discovered Package: boaideas/laravel-cli-create-user
Discovered Package: cviebrock/eloquent-sluggable
Discovered Package: dingo/api
Discovered Package: fideloper/proxy
Discovered Package: genealabs/laravel-model-caching
Discovered Package: igaster/laravel-theme
Discovered Package: ignited/laravel-omnipay
Discovered Package: intervention/image
Discovered Package: jenssegers/agent
Discovered Package: jgrossi/corcel
Discovered Package: laravel/passport
Discovered Package: laravel/scout
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: mpociot/laravel-apidoc-generator
Discovered Package: nesbot/carbon
Discovered Package: neobject/facebook-conversions-api
Discovered Package: nunomaduro/collision
Discovered Package: nuwave/lighthouse
Discovered Package: nwidart/laravel-modules
Discovered Package: orangehill/iseed
Discovered Package: overtrue/laravel-pinyin
Discovered Package: overtrue/laravel-wechat
Discovered Package: s-ichikawa/laravel-sendgrid-driver
Discovered Package: sentry/sentry-laravel
Discovered Package: socialiteproviders/manager
Discovered Package: sofa/eloquence-base
Discovered Package: sofa/eloquence-mutable
Discovered Package: spatie/laravel-activitylog
Discovered Package: spatie/laravel-permission
Discovered Package: spatie/laravel-query-builder
Discovered Package: spatie/laravel-sitemap
Discovered Package: tamayo/laravel-scout-elastic
Discovered Package: torann/geoip
Package manifest generated successfully.
116 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PS E:\wwwroot\object> composer show nuwave/lighthouse -i
easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
name : nuwave/lighthouse
descrip. : Lighthouse is a schema first GraphQL package for Laravel applications.
keywords : api, graphql, laravel, laravel-graphql
versions : * 4.10.2
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://lighthouse-php.com
source : [git] https://github.com/nuwave/lighthouse.git e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48
dist : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48 e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48
path : E:\wwwroot\object\vendor\nuwave\lighthouse
names : nuwave/lighthouse
support
issues : https://github.com/nuwave/lighthouse/issues
source : https://github.com/nuwave/lighthouse
autoload
psr-4
Nuwave\Lighthouse\ => src/
requires
ext-json *
illuminate/contracts 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
illuminate/http 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
illuminate/pagination 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
illuminate/support 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
illuminate/validation 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
php >= 7.1
webonyx/graphql-php ^0.13.2
requires (dev)
bensampo/laravel-enum ^1.28.3
composer/composer 1.10.0-RC as 1.9.3
ergebnis/composer-normalize ^2.2.2
haydenpierce/class-finder ^0.4.0
laravel/framework 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0
laravel/lumen-framework 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || dev-master
laravel/scout ^4.0 || ^5.0 || ^6.0 || ^7.0
mll-lab/graphql-php-scalars ^2.1
mockery/mockery ^1.0
nunomaduro/larastan ^0.4.3 || ^0.5.2
orchestra/database 3.5.* || 3.6.* || 3.7.* || 3.8.* || 3.9.* || ^4.0 || 5.x-dev
orchestra/testbench 3.5.* || 3.6.* || 3.7.* || 3.8.* || 3.9.* || ^4.0 || 5.x-dev
phpbench/phpbench @dev
phpunit/phpunit ^6.5 || ^7.5 || ^8.4
pusher/pusher-php-server ^3.2
suggests
bensampo/laravel-enum Convenient enum definitions that can easily be registered in your Schema
haydenpierce/class-finder Required for the artisan command lighthouse:validate-schema
laravel/scout Required for the @search directive
mll-lab/graphql-php-scalars Useful scalar types, required for @whereConditions
mll-lab/laravel-graphql-playground GraphQL IDE for better development workflow - integrated with Laravel
PS E:\wwwroot\object>
12. Search for tag:1.10 on github, there is v4.10.1, 4.10.2, and then 4.10 may continue to increase the tag to fix bugs. as shown in Figure 9
Figure 9
Leave a Reply