Skip to content
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

Merged
merged 3 commits into from
Aug 10, 2017

Conversation

XatMassacrE
Copy link

@XatMassacrE XatMassacrE commented Aug 2, 2017

resolve #14

Copy link
Collaborator

@jonirrings jonirrings left a 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 请求。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provided这个词能不能翻译成“给定”,或者“现有”?讨论讨论~~~

Copy link
Author

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 规范中评估请求“的部分。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaluate其实更多是“演算,求值”,譬如evaluate a function。对应中文一起讨论讨论。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译成”构建请求“怎么样?

Copy link
Collaborator

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 被抛出。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. “导致”和“产生”重复。
  2. 那么马上就会有一个 GraphQLError 被抛出,表示非法输入。

你看如何?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 如果这个函数的参数造成了一个非法的执行上下文
  2. 那么马上就会有一个 GraphQLError 被抛出,这个错误将会解释非法输入的具体信息。(引文前面的章节提到 GraphQLError 包含一些 location 和 info,这个地方这么翻译更清楚一点)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@jonirrings jonirrings changed the title API 参考-执行 APIReference-Execution.md Aug 4, 2017
@XatMassacrE
Copy link
Author

@jonirrings 麻烦看下修改意见,如果没问题的话,我就按照我的回复再提交一个修订版,如果有问题继续在对话框里面讨论。

@jonirrings
Copy link
Collaborator

@XatMassacrE 回复了,你瞅瞅

@XatMassacrE
Copy link
Author

@jonirrings 感谢校对。

@XatMassacrE
Copy link
Author

@sqrthree 按照校对意见修改完毕。

@@ -46,13 +45,10 @@ type ExecutionResult = {
}
```

Implements the "Evaluating requests" section of the GraphQL specification.
上面的代码实现了 GraphQL 规范中”处理请求“的部分。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『”处理请求“』你这俩标点是不是反了?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

咦... 好像是唉

@XatMassacrE
Copy link
Author

@sqrthree 改好啦

@linhe0x0
Copy link
Member

linhe0x0 commented Aug 9, 2017

@jonirrings 需要你来检查并 approve 一下。

@jonirrings jonirrings merged commit 2877c5b into xitu:zh-Hans Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APIReference-Execution.md
3 participants