大前端
-
在 Opera 浏览器中手动修改 https 至 http 的实现流程
1、在 Opera 浏览器中,打开的网址:https://cmcconsole.flydev.chinamcloud.cn/#/chzh/pcs/da666d1d2d43df871c1804f632d8795d ,如图1 图1 2、准备手动修改为:http://cmcconsole.flydev.chinamcloud.cn/#/chzh/pc…
-
在 Altair GraphQL Client 中请求 Shopify’s Store GraphQL API
1、参考:https://www.shuijingwanwq.com/2022/03/15/6129/ 。Shopify’s GraphQL Admin API 中,不存在一些在线商店的 API。 2、Shopify 后台的在线商店,请求网址: https://xxx.myshopify.com/admin/online-store/…
-
在 Laravel 6 v6.20.43、Laravel Telescope v2.1.17 中, /vendor/laravel/telescope/src/Watchers/EventWatcher.php:91,报错:get_class() expects parameter 1 to be object, string given
1、在 /vendor/laravel/telescope/src/Watchers/EventWatcher.php:91,报错:get_class() expects parameter 1 to be object, string given。如图1 图1 { "message": "get_class() expects paramete…
-
在 Laravel 6 中,2 个项目分别连接 2 个 Redis 的实现
1、现在存在 2 个项目,其域名分别为:wshop.local、wshop-master.local。其 .env 文件的 Redis 配置分别如下 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6378 REDIS_DB=1 REDIS_HOST=127.0.0.1 REDIS_P…
-
在 Lighthouse 5 中,基于 PHPUnit 编写 Mutation 的测试
1、在 Altair GraphQl Client 中运行成功。如图1 图1 mutation CreateThemeAsset { onlineStoreThemeAssetCreate( input: { themeId: "vogue", content: "string", key: "js/20220307.4.j…
-
在 PhpStorm、Laravel 6 中,事件日志:Switch Laravel Idea module system to laravel-modules? Switch or don’t show this again
1、在 PhpStorm、Laravel 6 中,事件日志:Switch Laravel Idea module system to laravel-modules? Switch or don’t show this again。如图1 图1 2、参考:https://laravel-idea.com/docs/modules 。Laravel…
-
在 Laravel 6 中报错:Target [Interface] is not instantiable while building [Resolver]
1、在 Laravel 6 中报错:Target [Interface] is not instantiable while building [Resolver]。如图1 图1 { "message": "Target [Modules//ThemeSetting//Schema//ThemeSchemaLoaderInterface] is …
-
模板文件的验证规则:文件大小限制的分析
1、参考 Shopify 后台的模板源码编辑,当上传一个大于 50 MB 的文件时,响应 413 Request Entity Too Large。这应该是 Nginx 的 server 中:client_max_body_size 50M 的设置所限制。如图1 图1 2、当上传一个 48.5 …
-
在 Laravel 6、Module、Lighthouse 中实现 安全 验证 的流程(使用验证器类来支持复杂的验证规则)
1、当请求响应成功时的结构。如图1 图1 mutation { onlineStoreThemeAssetCreate( input: { themeId: "vogue", content: "string", key: "string" } ) { themeAsset { id themeId co…
-
从 REST 迁移到 GraphQL 的一些思考与实践(创建资源),参考 Shopify
1、新增 template ,创建模板。如图1 图1 2、点击保存按钮,查看网络请求。请求网址: https://xxx.myshopify.com/admin/themes/111/assets 。请求方法: POST。这是 REST 实现。如图2 图2 请求的表单数据: asset[ke…