@graphox/cli (英语)
用于安装的国家预防机制软件包 Graphox CLI - 用于TypeScript monorepos的高性能GraphQL工具集.
安装
pnpm add @graphox/cli
# or
npm install @graphox/cli
# or
yarn add @graphox/cli
使用量
一旦安装完毕,您就可以使用 Graphox 命令 :
# Start the Language Server
pnpm graphox lsp
# Validate GraphQL files
pnpm graphox check
pnpm graphox check apps/web # Report only files under a directory
# Generate TypeScript types
pnpm graphox codegen
pnpm graphox codegen --clean
pnpm graphox codegen --watch
pnpm graphox codegen packages/schema # Only the projects and schema_types under a directory
# Run performance benchmarks
pnpm graphox benchmark
全球安装
pnpm add -g @graphox/cli
# Now you can use it directly
graphox lsp
graphox check
graphox codegen
支持的平台
此软件包会自动为您的平台下载正确的二进制 :
- 马科斯: x86 64 (英特尔)和ARM64 (苹果硅)
- 链接: x86 64 和 ARM64
- 窗口: x86 64 和 ARM64
特征
- 语言服务器( LSP): 实时 GraphQL 验证、自动完成、去定义、盘旋文件等
- 类型生成: GraphQL 操作生成的脚本类型
- 验证: 用于GraphQL计划和操作的颗粒诊断
- 碎片跟踪: 包之间的自动片段依赖分辨率
配置
创建一个 graphox.yaml 中的文件。 见 主要文件 详细情况.
编辑器支持
要在编辑器中获取验证和自动完成, 请在您的顶端添加以下一行 graphox.yaml 文件 :
# yaml-language-server: $schema=node_modules/@graphox/cli/graphox.schema.json
或者,如果你使用 VS 代码与 YAML 扩展名,您可以在工作空间设置中添加以下内容:
{
"yaml.schemas": {
"node_modules/@graphox/cli/graphox.schema.json": "graphox.yaml"
}
}
手动二进制下载
如果自动安装失败, 您可以手动下载二进制 页 次。 。 。 .
仓库
https://github.com/soundtrack你的品牌/图书
许可证
麻省理工学院——见 自由主义。 。 。 .