Category: Lighthouse
-
Post Views: 21 1. Response error in GraphQL: expected a value of type \”datetime\” but received: 2021-11-23t02:04:48.000000z. as shown in Figure 1 2. 2021-11-23t02:04:48.000000z is a datetime with time zone, and it is decided to convert to a UTC datetime format without time zone. Implement the corresponding conversion based on Carbon. in line with expectations. as shown in Figure 2…
-
Post Views: 17 1. In GraphQL Mutation, in the same HTTP request, only one mutation is now executed. as shown in Figure 1 2. When there are too many HTTP requests per unit time, the current limit of the interface will be triggered. as shown in Figure 2 3. It is planned to execute multiple mutations in the same HTTP…
-
Post Views: 19 1. Define in the GraphQL schema file as follows 2. In the custom validator class Validator classes modules\\OnlineStoreEthemeGraphQL\\Validators\\UnpublishThemeValidator, the code is implemented as follows 3. The request verification failed, which is in line with expectations. as shown in Figure 1 4. Confirm the sql generated by the verification rule again, and generate the following. as shown in…
-
Post Views: 16 1. The current implementation principle of the theme editor is: when a configuration item in the editor changes, the temporary storage API of the backend will be requested to cache the data to Redis. When the user clicks the save button, the save API of the backend is requested, and the data will be read from Redis…
-
Post Views: 21 1. The front-end request parameters are shown below. as shown in Figure 1 2. The backend converts the parameter $args of the method __invoke to json, which corresponds to the field in the front-end request body: variables. The code is implemented as follows 3. Print the JSON as follows. There are more fields: directive, and then the…
-
Post Views: 15 1. Only errors are reported in Linux: Failed to load type: OnlineStoreEthemePreset. Make sure the type is present in your schema definition. It is available in the local Windows 10 environment. as shown in Figure 1 2. Execute the command: php artisan cache: clear, clear the cache. The interface request was successful. The reason is that GraphQL…
-
Post Views: 13 1. Error in GraphQL: variable “$sessionID” of type “string” used in position expecting type “string!”.. as shown in Figure 1 2. View request query 3. Check the GraphQL document, $sessionId: String!. is missing !. as shown in Figure 2 4. After the adjustment in the request query, no more errors are reported. as shown in Figure 3
-
Post Views: 21 1. GraphQL architecture is defined as follows 2. Print the output 1 in the method __invoke in the class TemplateDetailsResolver, not output. as shown in Figure 1 3. The GraphQL schema definition is restored as follows, then the corresponding class method __invoke can be executed. as shown in Figure 2 4. Decide to split the GraphQL schema…
-
Post Views: 17 1. Argument 1 passed to nuwave\\lighthouse\schema\\typeregistry::get() must be of the type string, array given, Called in E:\\WWWRoot\\Object\Object\Vendor\\Nuwave\LightHouse\src\Schema\\Typeregistry.php on line 553. as shown in Figure 1 2. Edit the code and add __typename to the return parameter