这是indexloc提供的服务,不要输入任何密码
Skip to content

Complete the current simplified Chinese Translation #10723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ This document is available in the following translations:
- [French :fr:](translations/SECURITY.french.md)
- [Hindi :india:](translations/SECURITY.hindi.md)
- [Malayalam :india:](translations/SECURITY.malayalam.md)
- [中文 :cn:](translations/SECURITY.chinese.md)
1 change: 1 addition & 0 deletions remote-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ This document is available in the following translations:

- [French :fr:](translations/remote-schemas.french.md)
- [Hindi :india:](translations/remote-schemas.hindi.md)
- [中文 :cn:](translations/remote-schemas.chinese.md)
38 changes: 38 additions & 0 deletions translations/SECURITY.chinese.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## 报告漏洞

我们非常感谢向 Hasura 社区报告漏洞的安全研究人员和用户。所有报告都会由一组社区志愿者和 Hasura 团队进行彻底调查。

要报告安全问题,请通过电子邮件将所有细节发送至 [security@hasura.io](mailto:security@hasura.io),并附上所有必要的信息。

### 何时应该报告漏洞?

- 您认为您发现了 Hasura GraphQL 引擎或相关组件中的潜在安全漏洞。
- 您不确定漏洞如何影响 Hasura GraphQL 引擎。
- 您认为您发现了 Hasura GraphQL 引擎依赖的其他项目中的漏洞(例如,Heroku、Docker 等)。
- 您想报告任何其他可能危害 Hasura GraphQL 引擎用户的安全风险。

### 何时不应该报告漏洞?

- 您需要帮助调整 Hasura GraphQL 引擎组件的安全性。
- 您需要帮助应用与安全相关的更新。
- 您的问题与安全无关。

## 安全漏洞响应

每个报告都会在 3 个工作日内得到项目维护者和安全团队的确认和分析。

报告者将在问题分析和解决的每个阶段(初步评估 -> 修复 -> 发布)保持更新。

## 公共披露时间

公共披露日期由 Hasura 产品安全团队和漏洞提交者协商确定。一旦用户缓解措施可用,我们更倾向于尽早完全披露漏洞。当漏洞或修复尚未完全理解、解决方案未经充分测试,或需要与供应商协调时,披露可能会延迟。披露的时间框架通常从立即开始(特别是如果漏洞已经公开)到几周。报告到公开披露的时间框架通常为 7 天。Hasura GraphQL 引擎的维护者和安全团队将最终决定披露日期。

(某些部分灵感来源并经过改编自 [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))。

## 翻译

此文档提供以下语言的翻译版本:

- [French :fr:](../translations/SECURITY.french.md)
- [Hindi :india:](../translations/SECURITY.hindi.md)
- [Malayalam :india:](../translations/SECURITY.malayalam.md)
89 changes: 89 additions & 0 deletions translations/remote-schemas.chinese.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# 远程模式(Remote Schemas)

Hasura 为您提供带有授权和访问控制的 CRUD + 实时 GraphQL API。然而,在许多情况下,您需要编写包含自定义逻辑的 API(查询、变更)。例如,实现支付 API,或查询数据库中不存在的数据。

Hasura 具备合并远程 GraphQL 模式并提供统一 GraphQL API 的能力。可以将其视为自动化的模式合并。您只需构建自己的 GraphQL 服务,并将其 HTTP 端点提供给 Hasura。您的 GraphQL 服务可以使用任何编程语言或框架编写。

远程模式适用于以下场景:

* 自定义变更(*例如:在插入数据前运行验证*)
* 支持支付等功能,并提供一致的接口来访问它们,例如:即通过 GraphQL 引擎的 API 进行
* 从其他来源获取不同的数据(*例如:从天气 API 或另一个数据库*)

为了支持自定义业务逻辑,您需要创建一个自定义的 GraphQL 服务器(请参阅 [boilerplates](community/boilerplates/remote-schemas))并将其模式与 GraphQL 引擎的模式合并。

![远程模式架构](../assets/remote-schemas-arch.png)

## 演示 (*40 秒*)

[![合并远程模式的视频演示](https://img.youtube.com/vi/eY4n9aPsi0M/0.jpg)](https://www.youtube.com/watch?v=eY4n9aPsi0M)

[合并远程 GraphQL 模式(YouTube 链接)](https://youtu.be/eY4n9aPsi0M)

[添加远程模式](https://youtu.be/01t4t2t4q1c)

## 快速入门

尝试远程模式的最快方式是通过 Heroku。

1. 点击以下按钮,将 GraphQL 引擎与免费的 Postgres 插件一起部署到 Heroku:

[![部署到 Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)

2. 打开 Hasura 控制台

访问 `https://<app-name>.herokuapp.com`(*将 \<app-name\> 替换为您的应用名称*)以打开管理控制台。

3. 合并您的第一个远程模式并查询它

在管理控制台中,打开 ``Remote Schemas`` 标签页并点击 ``Add`` 按钮。填写以下信息:
* 远程模式名称:``countries`` (*此远程模式的别名*)。
* GraphQL 服务器 URL:``https://countries.trevorblades.com/`` (*一个公共的 GraphQL API,我们将用它快速查看此功能;由 [@trevorblades](https://github.com/trevorblades) 维护*)。
* 忽略其余的配置设置并点击 ``Add Remote Schema`` 按钮。

前往 ``GraphQL`` 标签页并运行以下查询 (*将其粘贴到左侧的查询窗口并点击* ▶️ *(播放) 按钮*):

```graphql
{
countries {
emoji
name
languages {
name
native
}
}
}
```

您可以使用 ``GraphQL`` 界面右上角的 ``Docs`` 浏览器来探索远程模式中的 GraphQL 类型。

## 模板

适用于流行语言/框架的自定义 GraphQL 服务器的模板可用。

* [常规模板](community/boilerplates/graphql-servers),可以部署到任何地方。
* [无服务器模板](https://github.com/hasura/graphql-serverless),可以部署到 AWS Lambda 等无服务器平台。

请注意,更多语言、框架、无服务器平台等的模板正在不断更新,社区贡献非常欢迎。

## 注意事项

**当前的限制**:

* 命名规则:类型名称和节点名称在所有合并的模式中必须是唯一的(区分大小写)。在接下来的几个版本中,将支持合并名称和结构相同的类型。
* 来自不同 GraphQL 服务器的节点无法在同一个查询/变更(query/mutation)中使用。所有顶层节点必须来自同一个 GraphQL 服务器。
* 不支持远程 GraphQL 服务器的订阅(subscription)。

这些限制将在后续版本中內解决

## 📄 文档

阅读完整[文档](https://hasura.io/docs/latest/graphql/core/remote-schemas/index.html)

## 翻译

此文档提供以下翻译版本:

- [French :fr:](translations/remote-schemas.french.md)
- [Hindi :india:](translations/remote-schemas.hindi.md)