Category: GraphQL
-
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: 16 1. The HTTP request body captured in the proxy software contains a large number of \n . as shown in Figure 1 2. Reference:Online text content keyword deletion – filter removal . Enter:\n in the keyword list, and then click Process. The results after treatment are as follows, in line with the expectations. as shown in Figure…
-
Post Views: 16 1. For the same GraphQL API request, it sometimes responds to 500 in the browser, and there is no response data, and sometimes the response is 200, and there is a response data. as shown in Figure 1 2. When the response is 500, there is no response data. Decide to set the error level to output…
-
Post Views: 21 1. In Altair GraphQL Client, click the button on the left side of the overloaded document in the address bar, the drop-down list will appear, and select Add to Favorites. as shown in Figure 1 2. Select a collection to create a new favorite. as shown in Figure 2 3. Named collection: Shop GraphQL API, choose a…
-
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: 16 1. A GraphQL API, which takes up to 7 seconds. as shown in Figure 1 2. The time to query this request in Laravel Telescope, 1345 ms. as shown in Figure 2 3. Instead of requesting the GraphQL API on the page, it takes 1.87 seconds to request a separate request using the Altair GraphQL Client. Approximately…