-
Notifications
You must be signed in to change notification settings - Fork 51
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
APIReference-Errors.md #52
Conversation
@@ -7,44 +7,43 @@ sublinks: formatError,GraphQLError,locatedError,syntaxError | |||
next: /graphql-js/execution/ | |||
--- | |||
|
|||
The `graphql/error` module is responsible for creating and formatting | |||
GraphQL errors. You can import either from the `graphql/error` module, or from the root `graphql` module. For example: | |||
`graphql/error` 模块负责创建和格式化 GraphQL 的错误信息。你可以直接从 `graphql/error`模块导入,也可以从 `graphql` 这个根模块导入。举例来说就是这样: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
第二个 graphql/error
后边需要加一个空格
</a> | ||
</li> | ||
<li> | ||
<a href="#formaterror"> | ||
<pre>function formatError</pre> | ||
Format an error according to the rules described by the Response Format. | ||
根据响应格式的规则描述格式化一条错误信息。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据响应格式的规则描述“来”格式化一条错误信息。
A representation of an error that occurred within GraphQL. Contains | ||
information about where in the query the error occurred for debugging. Most | ||
commonly constructed with `locatedError` below. | ||
GraphQLError 表示 GraphQL 产生的错误信息。它包含一些用于调试的信息,比如 query 语句中错误发生的位置。最常见的错误信息就是下面的的 `locatedError` 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query 可以直接翻译成“查询”
@@ -103,5 +97,4 @@ type GraphQLErrorLocation = { | |||
}; | |||
``` | |||
|
|||
Given a GraphQLError, format it according to the rules described by the | |||
Response Format, Errors section of the GraphQL Specification. | |||
给定一个 GraphQLError,根据 GraphQL 说明中的响应格式和错误分类的规则描述格式化错误信息。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specification 翻译成“规范”
@ydfzgyj 感谢校对 |
A representation of an error that occurred within GraphQL. Contains | ||
information about where in the query the error occurred for debugging. Most | ||
commonly constructed with `locatedError` below. | ||
GraphQLError 表示 GraphQL 产生的错误信息。它包含一些用于调试的信息,比如查询语句中错误发生的位置。最常见的错误信息就是下面的的 `locatedError` 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locatedError
和句号之间无需加空格
@@ -103,5 +97,4 @@ type GraphQLErrorLocation = { | |||
}; | |||
``` | |||
|
|||
Given a GraphQLError, format it according to the rules described by the | |||
Response Format, Errors section of the GraphQL Specification. | |||
给定一个 GraphQLError,根据 GraphQL 规范中的响应格式和错误分类的规则描述格式化错误信息。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里也有一个“……的规则描述‘来’格式化错误信息”,加上副词以免混淆“描述”的含义,因为上边出现了一次,我上次 review 的时候这里没有提,麻烦再修改一下
@ydfzgyj 感谢校对 |
@sqrthree 已按照校对者的意见修改完毕。 |
close #13