Category: Lighthouse v5
-
Post Views: 21 1. Report an error in Lighthouse: Failed to load type: themesettingrange. Make sure the type is present in your schema definition. There is an error message when viewing the request in the GraphQL client. as shown in Figure 1 2. Print the data to be responded to and find[__typename]=> ThemeSettingRange. as shown in Figure 2 3. Adjust…
-
Post Views: 13 1. Error in PHP 7.4: Illegal offset type in issue or empty. as shown in Figure 1 2. The code is as follows: 3. Print $setting, its value is the object. as shown in Figure 2 4. will $setting[‘settingId’]Convert to string. 5. The value of the printed and converted string is as follows 6. No more errors.
-
Post Views: 16 1. In response to the error in the GraphQL API: Expected a value of type \”URL\” but received: (Empty String). as shown in Figure 1 2. Print the object of the response, its value is String(0) “”. 3. Set in GraphQL, value: url . is allowed for null. But when it is String(0) “” , it is…
-
Post Views: 16 1. Respond to the GraphQL API and report an error: fields “default” cause they return conflicting types float! and boolean!. use Different aliases on the fields to fetch both if this was interested. 2. Check the query request and find that there is a corresponding prompt: fields “default” cause they return conflicting types “float!” and “boolean!”. Use…
-
Post Views: 16 1. In Laravel Framework 6.20.44, Nuwave/Lighthouse V5.52.1, an error is reported: Argument 1 Passed to App\\Exceptions\\Handler::report() must be an instance of exception, instance of error given, called in E:\WWRoot\\Object\Vendor\\nuwave\Lighthouse\src\execution\\reportingErrorHandler.php on line 39. as shown in Figure 1 2. Reference:https://www.shuijingwanwq.com/en/2022/01/26/9945/. The root cause is that the framework is not compatible with the extended version. However, it is now…
-
Post Views: 19 1. In Laravel Framework 6.20.44, Nuwave/Lighthouse V5.52.1, an error is reported: Argument 1 Passed to App\\Exceptions\\Handler::report() must be an instance of exception, instance of error given, called in E:\WWRoot\\Object\Vendor\\nuwave\Lighthouse\src\execution\\reportingErrorHandler.php on line 39. as shown in Figure 1 2. Reference:https://www.shuijingwanwq.com/en/2022/01/26/9945/. The root cause is that the framework is not compatible with the extended version. However, it is now…
-
Post Views: 20 1. In Lighthouse 5, an error is reported: illuminate\contracts\container\bindingResolutionException : target[Interface]Is not instantiable while building[Resolver]… as shown in Figure 1 2. Edit ThemeStoreGraphQL/Resources/GraphQL/Theme_Setting.GraphQL , comment out: TemplateSettingsData(BaseName: String!):[ThemeSection]@field(resolver: “modules\\themestoreGraphQL\\resolver\\onlinestoreetheme\\TemplateSettingsDataResolver”). Then no errors will be reported. 3. After uncommenting, check ThemeStoreGraphQL/Resolver/OnlineStoreEtheme/TemplateSettingsDateResolver.php . TemplateSchemaLoaderInterface is passed as a parameter to the constructor. 4. Check the service provider class of…
-
Post Views: 21 1. In Lighthouse 5, an error is reported: Failed to find class Modules\\ThemeStore\\Validators\\ThemeAsset\\CreateTheMeAssetInputValidator in namespaces[App\\GraphQL\\Validators]for directive @Validator. as shown in Figure 1 2. Confirm that the class Modules\\TheMeStore\\Validators\\ThemeAsset\\CreateTheMeAssetInputValidator has been migrated to Modules\\ThemeStoreGraphQL\\Validators\\ThemeAsset\\CreateTheMeAssetInputValidator . as shown in Figure 2 3. In the instruction @Validator After the class file path is adjusted to: Modules\\ThemeStoreGraphQL\\Validators\\ThemeAsset\\CreateTheMeAssetInputValidator, no more errors are…
-
Post Views: 15 1. Lighthouse uses a lot of SDL and uses mode instructions. In order to improve your editing experience, you can use the artisan command to generate a definition file. Error: Illuminate\Contracts\Container\BindingResolutionException : target[Modules\ThemeStore\View\ViewStorageInterface]Is not instantiable while building[Modules\ThemeStore\Resolver\OnlineStoreThemeResolver]. as shown in Figure 1 2. Execute the command: php artisan module:list to display a list of all modules. Confirm…
-
Post Views: 16 1. Error: 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 40. as shown in Figure 1 2. Reference URL:https://www.shuijingwanwq.com/en/2022/01/26/9945/. Caused by version compatibility issues. Edit /vendor/nuwave/lighthouse/src/execution/reportingErrorHandler.php. Print $error. Message: Argument 1 Passed to Nuwave\Lighthouse\Schema\TypeRegistry::get() must be of the type string, array given, Called in E:\WwWroot\Object\Vendor\NuWave\Lighthouse\src\Schema\Typeregistry.php…