Skip to content

Commit 24b7151

Browse files
ydfzgyjleviding
authored andcommitted
替换“规范”的链接到中文翻译 (xitu#82)
1 parent 5b4a54e commit 24b7151

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

site/_core/HeaderLinks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const links = [
1313
{ section: 'code', text: '代码', href: '/code/' },
1414
{ section: 'community', text: '社区', href: '/community/' },
1515
{ section: 'blog', text: '博客', href: '/blog/' },
16-
{ section: 'spec', text: '规范', href: 'http://facebook.github.io/graphql/' },
16+
{ section: 'spec', text: '规范', href: 'http://spec.graphql.cn/' },
1717
];
1818

1919
export default ({ section }) =>

site/_core/Site.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default ({ page, category, title, section, className, noSearch, children
8282
<div>
8383
<h5>更多</h5>
8484
<a href="/blog">GraphQL 团队博客</a>
85-
<a href="http://facebook.github.io/graphql/" target="_blank" rel="noopener noreferrer">阅读规范</a>
85+
<a href="http://spec.graphql.cn/" target="_blank" rel="noopener noreferrer">阅读规范</a>
8686
<a href="https://github.com/graphql" target="_blank" rel="noopener noreferrer">GitHub</a>
8787
{page && <a href={'https://github.com/xitu/graphql.github.io/edit/zh-Hans/site/' + page.relPath} target="_blank" rel="noopener noreferrer">编辑本页 &#x270E;</a>}
8888
</div>

site/learn/BestPractice-Introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GraphQL 通常通过单入口来提供 HTTP 服务的完整功能,这一实现
2323

2424
### JSON(使用 GZIP 压缩)
2525

26-
GraphQL 服务通常返回 JSON 格式的数据,但 GraphQL 规范 [并未要求这一点](http://facebook.github.io/graphql/#sec-Serialization-Format)。对于期望更好的网络性能的 API 层来说,使用 JSON 似乎是一个奇怪的选择,但由于它主要是文本,因而在 GZIP 压缩后表现非常好。
26+
GraphQL 服务通常返回 JSON 格式的数据,但 GraphQL 规范 [并未要求这一点](http://spec.graphql.cn/#sec-Serialization-Format-)。对于期望更好的网络性能的 API 层来说,使用 JSON 似乎是一个奇怪的选择,但由于它主要是文本,因而在 GZIP 压缩后表现非常好。
2727

2828
推荐任何在生产环境下的 GraphQL 服务都启用 GZIP,并推荐在客户端请求头中加入:
2929

site/learn/BestPractice-ServingOverHTTP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ http://myapi/graphql?query={me{name}}
6969
}
7070
```
7171

72-
如果没有返回错误,响应中不应当出现 `"errors"` 字段。如果没有返回数据,则 [根据 GraphQL 规范](http://facebook.github.io/graphql/#sec-Data),只能在执行期间发生错误时才能包含 `"data"` 字段。
72+
如果没有返回错误,响应中不应当出现 `"errors"` 字段。如果没有返回数据,则 [根据 GraphQL 规范](http://spec.graphql.cn//#sec-Data-),只能在执行期间发生错误时才能包含 `"data"` 字段。
7373

7474
## GraphiQL
7575
GraphiQL 在测试和开发过程中非常有用,但在生产环境下应当默认被禁用。如果你使用的是 express-graphql,可以根据 NODE_ENV 环境变量进行切换:

0 commit comments

Comments
 (0)