Skip to content

Commit 4b68517

Browse files
authored
翻译完成
翻译完成
1 parent 6a478a0 commit 4b68517

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/learn/Learn-Execution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type Starship {
5353

5454

5555

56-
## Root fields & resolvers 根字段&解析器函数
56+
## 根字段&解析器函数
5757

5858
每一个GraphQL服务端应用的顶层,必有一个类型代表着所有GraphQL API的入口,我们将他称之为Root Type 根类型或者查询类型。
5959

@@ -75,7 +75,7 @@ Query: {
7575
- `args`可以提供在GraphQL查询中传入的参数
7676
- `context`会被提供了所有解析器,并且持有重要的上下文信息比如当前登入的用户或者数据库访问对象
7777

78-
## Asynchronous resolvers 异步解析器函数
78+
## 异步解析器函数
7979

8080
让我们分析下下文中的解析器函数
8181

@@ -91,7 +91,7 @@ human(obj, args, context) {
9191

9292
这里要注意的是,只有解析器函数能感知到Promise,GraphQL查询只关注`human`字段是否返回,在执行期间如果异步操作没有完成,则GraphQL会一直等待下去,因此在这个环节需要关注并发处理上的优化。
9393

94-
## Trivial resolvers 标准解析器
94+
## 标准解析器
9595

9696
现在`Human`对象已经生成了,但GraphQL还是会继续递归执行下去。
9797

@@ -161,4 +161,4 @@ GraphQL将在同步执行这些Promise,当返回一个对象列表,它将继
161161
}
162162
}
163163
}
164-
```
164+
```

0 commit comments

Comments
 (0)