Skip to content

Commit 07800f4

Browse files
hasura-botjack-chan-123hgiasac
committed
Complete the current simplified Chinese Translation
GITHUB_PR_NUMBER: 10723 GITHUB_PR_URL: #10723 PR-URL: hasura/graphql-engine-mono#11216 Co-authored-by: jack-chan-123 <183378634+jack-chan-123@users.noreply.github.com> Co-authored-by: Toan Nguyen <1615675+hgiasac@users.noreply.github.com> GitOrigin-RevId: d284cbe20619ce18d2938a2e41f456bff6602bb6
1 parent beadacd commit 07800f4

4 files changed

Lines changed: 129 additions & 0 deletions

File tree

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ This document is available in the following translations:
3737
- [French :fr:](translations/SECURITY.french.md)
3838
- [Hindi :india:](translations/SECURITY.hindi.md)
3939
- [Malayalam :india:](translations/SECURITY.malayalam.md)
40+
- [中文 :cn:](translations/SECURITY.chinese.md)

remote-schemas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,4 @@ This document is available in the following translations:
8888

8989
- [French :fr:](translations/remote-schemas.french.md)
9090
- [Hindi :india:](translations/remote-schemas.hindi.md)
91+
- [中文 :cn:](translations/remote-schemas.chinese.md)

translations/SECURITY.chinese.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## 报告漏洞
2+
3+
我们非常感谢向 Hasura 社区报告漏洞的安全研究人员和用户。所有报告都会由一组社区志愿者和 Hasura 团队进行彻底调查。
4+
5+
要报告安全问题,请通过电子邮件将所有细节发送至 [security@hasura.io](mailto:security@hasura.io),并附上所有必要的信息。
6+
7+
### 何时应该报告漏洞?
8+
9+
- 您认为您发现了 Hasura GraphQL 引擎或相关组件中的潜在安全漏洞。
10+
- 您不确定漏洞如何影响 Hasura GraphQL 引擎。
11+
- 您认为您发现了 Hasura GraphQL 引擎依赖的其他项目中的漏洞(例如,Heroku、Docker 等)。
12+
- 您想报告任何其他可能危害 Hasura GraphQL 引擎用户的安全风险。
13+
14+
### 何时不应该报告漏洞?
15+
16+
- 您需要帮助调整 Hasura GraphQL 引擎组件的安全性。
17+
- 您需要帮助应用与安全相关的更新。
18+
- 您的问题与安全无关。
19+
20+
## 安全漏洞响应
21+
22+
每个报告都会在 3 个工作日内得到项目维护者和安全团队的确认和分析。
23+
24+
报告者将在问题分析和解决的每个阶段(初步评估 -> 修复 -> 发布)保持更新。
25+
26+
## 公共披露时间
27+
28+
公共披露日期由 Hasura 产品安全团队和漏洞提交者协商确定。一旦用户缓解措施可用,我们更倾向于尽早完全披露漏洞。当漏洞或修复尚未完全理解、解决方案未经充分测试,或需要与供应商协调时,披露可能会延迟。披露的时间框架通常从立即开始(特别是如果漏洞已经公开)到几周。报告到公开披露的时间框架通常为 7 天。Hasura GraphQL 引擎的维护者和安全团队将最终决定披露日期。
29+
30+
(某些部分灵感来源并经过改编自 [https://github.com/kubernetes/website/blob/master/content/en/docs/reference/issues-security/security.md](https://github.com/kubernetes/website/blob/master/content/en/docs/reference/issues-security/security.md))。
31+
32+
## 翻译
33+
34+
此文档提供以下语言的翻译版本:
35+
36+
- [French :fr:](../translations/SECURITY.french.md)
37+
- [Hindi :india:](../translations/SECURITY.hindi.md)
38+
- [Malayalam :india:](../translations/SECURITY.malayalam.md)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# 远程模式(Remote Schemas)
2+
3+
Hasura 为您提供带有授权和访问控制的 CRUD + 实时 GraphQL API。然而,在许多情况下,您需要编写包含自定义逻辑的 API(查询、变更)。例如,实现支付 API,或查询数据库中不存在的数据。
4+
5+
Hasura 具备合并远程 GraphQL 模式并提供统一 GraphQL API 的能力。可以将其视为自动化的模式合并。您只需构建自己的 GraphQL 服务,并将其 HTTP 端点提供给 Hasura。您的 GraphQL 服务可以使用任何编程语言或框架编写。
6+
7+
远程模式适用于以下场景:
8+
9+
* 自定义变更(*例如:在插入数据前运行验证*
10+
* 支持支付等功能,并提供一致的接口来访问它们,例如:即通过 GraphQL 引擎的 API 进行
11+
* 从其他来源获取不同的数据(*例如:从天气 API 或另一个数据库*
12+
13+
为了支持自定义业务逻辑,您需要创建一个自定义的 GraphQL 服务器(请参阅 [boilerplates](community/boilerplates/remote-schemas))并将其模式与 GraphQL 引擎的模式合并。
14+
15+
![远程模式架构](../assets/remote-schemas-arch.png)
16+
17+
## 演示 (*40 秒*)
18+
19+
[![合并远程模式的视频演示](https://img.youtube.com/vi/eY4n9aPsi0M/0.jpg)](https://www.youtube.com/watch?v=eY4n9aPsi0M)
20+
21+
[合并远程 GraphQL 模式(YouTube 链接)](https://youtu.be/eY4n9aPsi0M)
22+
23+
[添加远程模式](https://youtu.be/01t4t2t4q1c)
24+
25+
## 快速入门
26+
27+
尝试远程模式的最快方式是通过 Heroku。
28+
29+
1. 点击以下按钮,将 GraphQL 引擎与免费的 Postgres 插件一起部署到 Heroku:
30+
31+
[![部署到 Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)
32+
33+
2. 打开 Hasura 控制台
34+
35+
访问 `https://<app-name>.herokuapp.com`*\<app-name\> 替换为您的应用名称*)以打开管理控制台。
36+
37+
3. 合并您的第一个远程模式并查询它
38+
39+
在管理控制台中,打开 ``Remote Schemas`` 标签页并点击 ``Add`` 按钮。填写以下信息:
40+
* 远程模式名称:``countries`` (*此远程模式的别名*)。
41+
* GraphQL 服务器 URL:``https://countries.trevorblades.com/`` (*一个公共的 GraphQL API,我们将用它快速查看此功能;由 [@trevorblades](https://github.com/trevorblades) 维护*)。
42+
* 忽略其余的配置设置并点击 ``Add Remote Schema`` 按钮。
43+
44+
前往 ``GraphQL`` 标签页并运行以下查询 (*将其粘贴到左侧的查询窗口并点击* ▶️ *(播放) 按钮*):
45+
46+
```graphql
47+
{
48+
countries {
49+
emoji
50+
name
51+
languages {
52+
name
53+
native
54+
}
55+
}
56+
}
57+
```
58+
59+
您可以使用 ``GraphQL`` 界面右上角的 ``Docs`` 浏览器来探索远程模式中的 GraphQL 类型。
60+
61+
## 模板
62+
63+
适用于流行语言/框架的自定义 GraphQL 服务器的模板可用。
64+
65+
* [常规模板](community/boilerplates/graphql-servers),可以部署到任何地方。
66+
* [无服务器模板](https://github.com/hasura/graphql-serverless),可以部署到 AWS Lambda 等无服务器平台。
67+
68+
请注意,更多语言、框架、无服务器平台等的模板正在不断更新,社区贡献非常欢迎。
69+
70+
## 注意事项
71+
72+
**当前的限制**:
73+
74+
* 命名规则:类型名称和节点名称在所有合并的模式中必须是唯一的(区分大小写)。在接下来的几个版本中,将支持合并名称和结构相同的类型。
75+
* 来自不同 GraphQL 服务器的节点无法在同一个查询/变更(query/mutation)中使用。所有顶层节点必须来自同一个 GraphQL 服务器。
76+
* 不支持远程 GraphQL 服务器的订阅(subscription)。
77+
78+
这些限制将在后续版本中內解决
79+
80+
## 📄 文档
81+
82+
阅读完整[文档](https://hasura.io/docs/latest/graphql/core/remote-schemas/index.html)
83+
84+
## 翻译
85+
86+
此文档提供以下翻译版本:
87+
88+
- [French :fr:](translations/remote-schemas.french.md)
89+
- [Hindi :india:](translations/remote-schemas.hindi.md)

0 commit comments

Comments
 (0)