# @escape\.tech/graphql-armor 中文文档

规范地址：https://npmcn.com/package/%40escape.tech/graphql-armor/

版本：3\.2\.0
npm 元数据更新时间：2025-12-29T10:27:31.332Z
中文译文更新时间：2026-11-13T21:57:00.166Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40escape.tech/graphql-armor
原文对照：https://npmcn.com/package/%40escape.tech/graphql-armor/?lang=original
项目主页：https://github.com/Escape-Technologies/graphql-armor
源码仓库：https://github.com/Escape-Technologies/graphql-armor

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：42.4 kB，10 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=18\.0\.0
- 运行依赖：7 个
- peer 依赖：@apollo/server ^4\.0\.0 \|\| ^5\.0\.0，@envelop/core ^5\.0\.0，@escape\.tech/graphql-armor-types 0\.7\.0
- 首次发布：2022-08-02T16:27:33.659Z
- 最新版本发布：2025-12-29T10:27:30.814Z
- 近 30 天下载量：1477099（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：61（近 12 个月 1 个）

## 中文简介

Aporo GraphQL 服务器屏蔽的已死而易事但高度定制的安全中间软件

## 安装

```sh
npm install @escape.tech/graphql-armor
```

也可以使用：`pnpm add @escape.tech/graphql-armor`、`yarn add @escape.tech/graphql-armor`、`bun add @escape.tech/graphql-armor`

## README

# 图QL 装甲

图QL Armor是用于各种GraphQL服务器引擎的已死但高度自定义的安全中间软件.

![GraphQL-Armor banner](https://raw.githubusercontent.com/Escape-Technologies/graphql-armor/main/services/docs/static/img/banner.png)

[![CI](https://github.com/Escape-Technologies/graphql-armor/actions/workflows/ci.yaml/badge.svg)](https://github.com/Escape-Technologies/graphql-armor/actions/workflows/ci.yaml) [![release](https://github.com/Escape-Technologies/graphql-armor/actions/workflows/release.yaml/badge.svg)](https://github.com/Escape-Technologies/graphql-armor/actions/workflows/release.yaml) [![e2e](https://github.com/Escape-Technologies/graphql-armor/actions/workflows/e2e.yaml/badge.svg)](https://github.com/Escape-Technologies/graphql-armor/actions/workflows/e2e.yaml) ![npm](https://img.shields.io/npm/v/@escape.tech/graphql-armor) [![codecov](https://codecov.io/gh/Escape-Technologies/graphql-armor/branch/main/graph/badge.svg)](https://codecov.io/gh/Escape-Technologies/graphql-armor)

## 安装

```bash
# npm
npm install -S @escape.tech/graphql-armor

# yarn
yarn add @escape.tech/graphql-armor
```

## 文档

[https://escape.tech/graphql-armor/docs/getting-启动](https://escape.tech/graphql-armor/docs/getting-started)

## 支持的图形QL 引擎

我们支持下列发动机:

-   [阿波罗服务器](https://www.apollographql.com/)
-   [图QL 瑜伽](https://www.graphql-yoga.com/)

我们还支持以下发动机通过 [覆盖](https://www.envelop.dev/) 插件系统 :

-   图QL- Helix
-   节点.js HTTP
-   图QL- Helix (带有 @ defer 和 @ stream)
-   图QL-WS
-   图QL- SSE
-   Azure 函数
-   云花岗工人
-   谷歌云函数
-   蓝巴达AWS
-   类型图形ql
-   关联
-   表达式ql

见 [这里](https://www.envelop.dev/docs/integrations) 以获取关于Enverlop兼容性的更多信息.

## 企业的图QL安全

是否有兴趣在企业一级获得图QL API? 访问 [逃难网站](https://escape.tech/) 学习更多.

## 捐款

确保您已经读取 [贡献指南](https://github.com/Escape-Technologies/graphql-armor/blob/main/CONTRIBUTING.md) 在贡献之前.

为了安排项目,确保你运行 `install-dev.sh` 剧本.

```bash
git clone git@github.com:Escape-Technologies/graphql-armor.git
cd graphql-armor
bash ./install-dev.sh
```

我们正在使用纱线作为我们的包管理器和 [工作空间单列集设置](https://classic.yarnpkg.com/lang/en/docs/workspaces/)请阅读相关文件, 如果您在开发项目时遇到问题, 请随意打开问题 !

## 我们雇用!

我们认为是时候将更多AI驱动的创新带入网络安全, 想加入我们的冒险吗? 看看我们 [**事业**](https://jobs.escape.tech/) 页面!

## 常见问题

### @escape\.tech/graphql-armor 是什么？

Aporo GraphQL 服务器屏蔽的已死而易事但高度定制的安全中间软件

### 如何安装 @escape\.tech/graphql-armor？

在项目目录运行 npm install @escape\.tech/graphql-armor，或使用 pnpm add / yarn add / bun add。

### @escape\.tech/graphql-armor 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @escape\.tech/graphql-armor 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @escape\.tech/graphql-armor 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=18\.0\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @escape\.tech/graphql-armor 可以商用吗？

@escape\.tech/graphql-armor 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @escape\.tech/graphql-armor 的下载量有多少？

根据 npm 官方下载统计，@escape\.tech/graphql-armor 在 2026/10/14 – 2026/11/12 这 30 天内被下载 1,477,099 次，日均约 49,237 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @escape\.tech/graphql-armor 还在维护吗？

最新版本 3\.2\.0 发布于 2025/12/29（10 个月前）；至今共发布 61 个版本，其中过去 12 个月发布了 1 个；首次发布于 2022/08/03。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

