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
Guides-ConstructingTypes.md #50
Conversation
@@ -6,11 +6,11 @@ permalink: /graphql-js/constructing-types/ | |||
next: /graphql-js/express-graphql/ | |||
--- | |||
|
|||
For many apps, you can define a fixed schema when the application starts, and define it using GraphQL schema language. In some cases, it's useful to construct a schema programmatically. You can do this using the `GraphQLSchema` constructor. | |||
对多数应用来说,你可以在开始运行的时候使用 GraphQL 模式语言声明固有的模式。但有些情况下,使用程序构建模式也很有用。你可使用 `GraphQLSchema` 构造函数来做这件事。 |
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 不翻译
@@ -112,6 +112,6 @@ app.listen(4000); | |||
console.log('Running a GraphQL API server at localhost:4000/graphql'); | |||
``` | |||
|
|||
When we use this method of creating the API, the root level resolvers are implemented on the `Query` and `Mutation` types rather than on a `root` object. | |||
当我们使用这种方式构建 API 时,根解析器是构建在 `Query` 和 `Mutation` 类型, 而不是 `root` 对象上的。 |
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.
第二个逗号是英文
|
||
This is particularly useful if you want to create a GraphQL schema automatically from something else, like a database schema. You might have a common format for something like creating and updating database records. This is also useful for implementing features like union types which don't map cleanly to ES6 classes and schema language. | ||
这种方法在你想要通过一些手段(例如数据库模式)自动创建 GraphQL 模式时很有用。如此一来你就可以有些类似于创建和更改数据库记录的通用模板。还有,在实现类似集合类型(union types)这种没法轻易映射为 ES6 Class 或者纯模式语言实现的功能时,此方法也很有用。 |
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, “Schema Language” 翻成“模式语言”,可否? @ydfzgyj |
schema 不翻译主要是能翻译成模式的词太多,model、pattern 被翻译成模式的情况都很常见,我觉得“模式语言”还是会有混淆的问题,还是保留原词为好,虽然是有点奇怪…… |
Schema 这个词我之前没有看到过相关的翻译,的确都是保留下来的,如果这份文档没有专门提出一个术语表而且保证用户一定会看到的话,还是保留 Schema 吧, 所以我这个问题的解决方案得是“Schema”语言了么...l @ydfzgyj |
如果你实在觉得“schema 语言”别扭的话,直接保留“schema language” 我也是可以接受的😂 |
没有找到更好的翻译之前还是保留 Schema Language 吧,之后大家有更好的认识以后统一替换掉 @ydfzgyj |
把之前翻的 “数据库模式” 也改回 ‘数据库 Schema“ 了 @ydfzgyj |
close #21