-
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-Execution.md #57
APIReference-Execution.md #57
Conversation
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.
需要讨论细节
|
||
<ul class="apiIndex"> | ||
<li> | ||
<a href="#execute"> | ||
<pre>function execute</pre> | ||
Executes a GraphQL request on the provided schema. | ||
对定义好的 schema 执行一个 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.
provided这个词能不能翻译成“给定”,或者“现有”?讨论讨论~~~
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.
翻译成”给定“吧。
对给定的 schema 执行一个 GraphQL 请求。
@@ -46,13 +45,10 @@ type ExecutionResult = { | |||
} | |||
``` | |||
|
|||
Implements the "Evaluating requests" section of the GraphQL specification. | |||
上面的代码实现了 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.
evaluate其实更多是“演算,求值”,譬如evaluate a function。对应中文一起讨论讨论。
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.
翻译成”构建请求“怎么样?
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.
构建请求不适合,因为请求是在客户端构建,服务端处理来自客户端的请求,这里是服务端,直接翻译成 处理请求 如何?
|
||
If the arguments to this function do not result in a legal execution context, | ||
a GraphQLError will be thrown immediately explaining the invalid input. | ||
如果这个函数的参数导致产生了一个非法的执行上下文,那么马上就会有一个解释非法输入的 GraphQLError 被抛出。 |
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.
- “导致”和“产生”重复。
- 那么马上就会有一个 GraphQLError 被抛出,表示非法输入。
你看如何?
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.
- 如果这个函数的参数造成了一个非法的执行上下文
- 那么马上就会有一个 GraphQLError 被抛出,这个错误将会解释非法输入的具体信息。(引文前面的章节提到 GraphQLError 包含一些 location 和 info,这个地方这么翻译更清楚一点)
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.
nice
@jonirrings 麻烦看下修改意见,如果没问题的话,我就按照我的回复再提交一个修订版,如果有问题继续在对话框里面讨论。 |
@XatMassacrE 回复了,你瞅瞅 |
@jonirrings 感谢校对。 |
@sqrthree 按照校对意见修改完毕。 |
@@ -46,13 +45,10 @@ type ExecutionResult = { | |||
} | |||
``` | |||
|
|||
Implements the "Evaluating requests" section of the GraphQL specification. | |||
上面的代码实现了 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.
『”处理请求“』你这俩标点是不是反了?
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.
咦... 好像是唉
@sqrthree 改好啦 |
@jonirrings 需要你来检查并 approve 一下。 |
resolve #14