
{
products(first: 3) {
edges {
node {
id
title
}
}
}
}

query ($first: Int!){
products(first: $first) {
edges {
node {
id
title
}
}
}
}
{
"first": 3
}




9、参考网址:https://www.npmjs.com/package/graphql-introspection-json-to-sdl ,将格式从 GraphQL 内省 JSON 转换为 GraphQL SDL。
PS E:\wwwroot\shopify-graphql> npm install graphql-introspection-json-to-sdl
added 7 packages, and audited 8 packages in 15s
found 0 vulnerabilities
PS E:\wwwroot\shopify-graphql> ls
目录: E:\wwwroot\shopify-graphql
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2022/2/21 14:08 node_modules
-a---- 2022/2/21 14:08 4632 package-lock.json
-a---- 2022/2/21 14:08 78 package.json
-a---- 2022/2/21 13:59 6115414 schema.json
PS E:\wwwroot\shopify-graphql> graphql-introspection-json-to-sdl schema.json > schema.graphql
graphql-introspection-json-to-sdl : 无法加载文件 C:\Users\Lenovo\AppData\Roaming\np
m\graphql-introspection-json-to-sdl.ps1,因为在此系统上禁止运行脚本。有关详 细信息,
请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies
。
所在位置 行:1 字符: 1
+ graphql-introspection-json-to-sdl schema.json > schema.graphql
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS E:\wwwroot\shopify-graphql> get-executionpolicy
Restricted
PS E:\wwwroot\shopify-graphql> set-executionpolicy remotesigned
执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如
https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies
帮助主题所述。是否要更改执行策略?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助
(默认值为“N”):Y
PS E:\wwwroot\shopify-graphql> graphql-introspection-json-to-sdl schema.json > schema.graphql
PS E:\wwwroot\shopify-graphql> ls
目录: E:\wwwroot\shopify-graphql
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2022/2/21 14:08 node_modules
-a---- 2022/2/21 14:08 4632 package-lock.json
-a---- 2022/2/21 14:08 78 package.json
-a---- 2022/2/21 16:10 2015866 schema.graphql
-a---- 2022/2/21 16:01 2128569 schema.json
PS E:\wwwroot\shopify-graphql>

需要长期技术维护或远程问题排查?
我是拥有 15+ 年经验的 PHP / Go 后端工程师,长期关注已有系统维护、Bug 修复、性能优化、服务器排查、WordPress 网站维护和小功能迭代。
如果你的项目遇到以下情况,可以先从一次小问题排查开始合作:
- ✅ PHP / Laravel / Yii2 老项目无人维护
- ✅ Go / Gin 后端接口需要排查或优化
- ✅ WordPress 网站访问慢、报错或插件冲突
- ✅ Nginx / MySQL / Redis / Linux 服务器异常
- ✅ CDN / Cloudflare / DNS / HTTPS 配置问题
- ✅ 需要长期远程技术支持或兼职维护
更多介绍请查看:关于我 & 合作
微信:13980074657
邮箱:shuijingwanwq@gmail.com
Telegram:@shuijingwan
GitHub:https://github.com/shuijingwan

发表回复