Skip to content

Commit b11b3f2

Browse files
authored
Merge pull request xitu#39 from jonirrings/code-index.html.js
2 parents bf4e367 + 3bbcb4a commit b11b3f2

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

site/code/index.html.js

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export default ({ page, site }) =>
1919
<h1>Code</h1>
2020
<Marked>{`
2121
22-
Many different programming languages support GraphQL. This list contains some of the more popular server-side frameworks, client libraries, and other useful stuff.
22+
GraphQL 已有多种编程语言支持。下表包含一些流行的服务端框架、客户端库和其他有用的内容。
2323
24-
## Server Libraries
24+
## 服务端库
2525
26-
In addition to the GraphQL [reference implementations in JavaScript](#javascript), server libraries include:
26+
除了 GraphQL [JavaScript 参考实现](#javascript),还有其他服务端库:
2727
2828
- [C# / .NET](#c-net)
2929
- [Clojure](#clojure)
@@ -39,14 +39,14 @@ In addition to the GraphQL [reference implementations in JavaScript](#javascript
3939
4040
### C# / .NET
4141
42-
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
43-
- [graphql-net](https://github.com/ckimes89/graphql-net): Convert GraphQL to IQueryable
42+
- [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet):.NET 的 GraphQL 实现
43+
- [graphql-net](https://github.com/ckimes89/graphql-net):转换 GraphQL IQueryable
4444
4545
### Clojure
4646
4747
#### [alumbra](https://github.com/alumbra/alumbra)
4848
49-
A set of reusable GraphQL components for Clojure conforming to the data structures given in [alumbra.spec](https://github.com/alumbra/alumbra.spec).
49+
一套 Clojure 的 GraphQL 可复用组件,满足 [alumbra.spec](https://github.com/alumbra/alumbra.spec) 规范要求的数据结构。
5050
5151
\`\`\`clojure
5252
(require '[alumbra.core :as alumbra]
@@ -85,9 +85,9 @@ $ curl -XPOST "http://0:3000" -H'Content-Type: application/json' -d'{
8585
8686
#### [graphql-clj](https://github.com/tendant/graphql-clj)
8787
88-
A Clojure library that provides a GraphQL implementation.
88+
一个提供 GraphQL 实现的 Clojure 库。
8989
90-
Code that executes a hello world GraphQL query with \`graphql-clj\`:
90+
可以执行一个 \`hello world\` GraphQL 查询的 \`graphql-clj\` 代码如下:
9191
9292
\`\`\`clojure
9393
@@ -105,30 +105,30 @@ Code that executes a hello world GraphQL query with \`graphql-clj\`:
105105
(executor/execute nil schema resolver-fn "{ hello }")
106106
\`\`\`
107107
108-
- [lacinia](https://github.com/walmartlabs/lacinia): A full implementation of the GraphQL specification that aims to maintain external compliance with the specification.
108+
- [lacinia](https://github.com/walmartlabs/lacinia):一套 GraphQL 规范的完整实现,致力于维护对规范的外部兼容。
109109
110110
### Elixir
111111
112-
- [absinthe](https://github.com/absinthe-graphql/absinthe): GraphQL implementation for Elixir.
113-
- [graphql-elixir](https://github.com/graphql-elixir/graphql): An Elixir implementation of Facebook's GraphQL.
112+
- [absinthe](https://github.com/absinthe-graphql/absinthe):Elixir 的 GraphQL 实现。
113+
- [graphql-elixir](https://github.com/graphql-elixir/graphql): 一个 Facebook GraphQL 的 Elixir 实现。
114114
115115
### Erlang
116116
117-
- [graphql-erlang](https://github.com/shopgun/graphql-erlang): GraphQL implementation in Erlang.
117+
- [graphql-erlang](https://github.com/shopgun/graphql-erlang):Erlang 的 GraphQL 实现。
118118
119119
### Go
120120
121-
- [graphql-go](https://github.com/graphql-go/graphql): An implementation of GraphQL for Go / Golang.
122-
- [graphql-relay-go](https://github.com/graphql-go/relay): A Go/Golang library to help construct a graphql-go server supporting react-relay.
123-
- [neelance/graphql-go](https://github.com/neelance/graphql-go): An active implementation of GraphQL in Golang.
121+
- [graphql-go](https://github.com/graphql-go/graphql): 一个 Go/Golang 的 GraphQL 实现。
122+
- [graphql-relay-go](https://github.com/graphql-go/relay): 一个用于帮助构建 graphql-go 服务器的 Go/Golang 库,支持 react-relay
123+
- [neelance/graphql-go](https://github.com/neelance/graphql-go):一个活跃的 Golang GraphQL 实现。
124124
125125
### Java
126126
127127
#### [graphql-java](https://github.com/graphql-java/graphql-java)
128128
129-
A Java library for building GraphQL APIs.
129+
一个用于构建 GraphQL API 的 Java 库。
130130
131-
Code that executes a hello world GraphQL query with \`graphql-java\`:
131+
可以执行一个 \`hello world\` GraphQL 查询的 \`graphql-java\` 代码如下:
132132
133133
\`\`\`java
134134
import graphql.ExecutionResult;
@@ -166,21 +166,21 @@ public class HelloWorld {
166166
}
167167
\`\`\`
168168
169-
See [the graphql-java docs](https://github.com/graphql-java/graphql-java) for more information on setup.
169+
查看 [graphql-java 文档](https://github.com/graphql-java/graphql-java) 以了解更多信息。
170170
171171
### JavaScript
172172
173173
#### [GraphQL.js](/graphql-js/) ([github](https://github.com/graphql/graphql-js/)) ([npm](https://www.npmjs.com/package/graphql))
174174
175-
The reference implementation of the GraphQL specification, designed for running GraphQL in a Node.js environment.
175+
GraphQL 规范的参考实现,设计用于在 Node.js 环境中运行。
176176
177-
To run a \`GraphQL.js\` hello world script from the command line:
177+
如果要在命令行中运行一个 \`GraphQL.js\` 的 \`hello world\` 脚本:
178178
179179
\`\`\`bash
180180
npm install graphql
181181
\`\`\`
182182
183-
Then run \`node hello.js\` with this code in \`hello.js\`:
183+
然后使用 \`node hello.js\` 以运行 \`hello.js\` 中的代码:
184184
185185
\`\`\`js
186186
var { graphql, buildSchema } = require('graphql');
@@ -200,15 +200,15 @@ graphql(schema, '{ hello }', root).then((response) => {
200200
201201
#### [express-graphql](/graphql-js/running-an-express-graphql-server/) ([github](https://github.com/graphql/express-graphql)) ([npm](https://www.npmjs.com/package/express-graphql))
202202
203-
The reference implementation of a GraphQL API server over an Express webserver. You can use this to run GraphQL in conjunction with a regular Express webserver, or as a standalone GraphQL server.
203+
基于 Express webserver 服务器的一个 GraphQL API 服务端参考实现,你可以用它结合常规 Express webserver 来运行 GraphQL,也可以作为独立 GraphQL 服务器。
204204
205-
To run an \`express-graphql\` hello world server:
205+
如果要运行 \`express-graphql\` hello world 服务器:
206206
207207
\`\`\`bash
208208
npm install express express-graphql graphql
209209
\`\`\`
210210
211-
Then run \`node server.js\` with this code in \`server.js\`:
211+
然后使用 \`node server.js\` 以运行 \`server.js\` 中的代码:
212212
213213
\`\`\`js
214214
var express = require('express');
@@ -234,15 +234,15 @@ app.listen(4000, () => console.log('Now browse to localhost:4000/graphql'));
234234
235235
#### [graphql-server](http://dev.apollodata.com/tools/graphql-server/index.html) ([github](https://github.com/apollostack/graphql-server)) ([npm](https://www.npmjs.com/package/graphql-server-express))
236236
237-
A set of GraphQL server packages from Apollo that work with various Node.js HTTP frameworks (Express, Connect, Hapi, Koa etc).
237+
来自于 Apollo 的一套 GraphQL server 包,可用于多种 Node.js HTTP 框架(ExpressConnectHapiKoa 等)。
238238
239-
To run a hello world server with graphql-server-express:
239+
如果要运行 \`graphql-server-express\` 的 hello world 服务器:
240240
241241
\`\`\`bash
242242
npm install graphql-server-express body-parser express graphql graphql-tools
243243
\`\`\`
244244
245-
Then run \`node server.js\` with this code in \`server.js\`:
245+
然后使用 \`node server.js\` 以运行 \`server.js\` 中的代码:
246246
247247
\`\`\`js
248248
var express = require('express');
@@ -274,26 +274,26 @@ app.use('/graphiql', graphiqlExpress({endpointURL: '/graphql'}));
274274
app.listen(4000, () => console.log('Now browse to localhost:4000/graphiql'));
275275
\`\`\`
276276
277-
GraphQL Server also supports all Node.js HTTP server frameworks: Express, Connect, HAPI and Koa.
277+
GraphQL Server 也支持所有的 Node.js HTTP 服务器框架:ExpressConnectHAPI Koa
278278
279279
### PHP
280280
281-
- [graphql-php](https://github.com/webonyx/graphql-php): A PHP port of GraphQL reference implementation
282-
- [graphql-relay-php](https://github.com/ivome/graphql-relay-php): A library to help construct a graphql-php server supporting react-relay.
281+
- [graphql-php](https://github.com/webonyx/graphql-php):GraphQL 参考实现的 PHP 移植版本。
282+
- [graphql-relay-php](https://github.com/ivome/graphql-relay-php):一个用于辅助构建 graphql-php 服务器的库,支持 react-relay
283283
284284
### Python
285285
286286
#### [Graphene](http://graphene-python.org/) ([github](https://github.com/graphql-python/graphene))
287287
288-
A Python library for building GraphQL APIs.
288+
一个用于构建 GraphQL API 的 Python 库。
289289
290-
To run a Graphene hello world script:
290+
如果要运行一个 Graphene hello world 脚本:
291291
292292
\`\`\`bash
293293
pip install graphene
294294
\`\`\`
295295
296-
Then run \`python hello.py\` with this code in \`hello.py\`:
296+
然后使用 \`python hello.py\` 以运行 \`hello.py\` 中的代码:
297297
298298
\`\`\`python
299299
import graphene
@@ -309,21 +309,21 @@ result = schema.execute('{ hello }')
309309
print(result.data['hello'])
310310
\`\`\`
311311
312-
There are also nice bindings for [Relay](https://facebook.github.io/relay/), Django, SQLAlchemy, and Google App Engine.
312+
其也有对 [Relay](https://facebook.github.io/relay/)DjangoSQLAlchemy Google App Engine 的良好绑定。
313313
314314
### Ruby
315315
316316
#### [graphql-ruby](https://github.com/rmosolgo/graphql-ruby)
317317
318-
A Ruby library for building GraphQL APIs.
318+
一个用于构建 GraphQL API 的 Ruby 库。
319319
320-
To run a hello world script with \`graphql-ruby\`:
320+
如果要使用 \`graphql-ruby\` 运行一个 hello world 脚本:
321321
322322
\`\`\`bash
323323
gem install graphql
324324
\`\`\`
325325
326-
Then run \`ruby hello.rb\` with this code in \`hello.rb\`:
326+
然后使用 \`ruby hello.rb\` 运行 \`hello.rb\` 中的代码:
327327
328328
\`\`\`ruby
329329
require 'graphql'
@@ -343,13 +343,13 @@ end
343343
puts Schema.execute('{ hello }')
344344
\`\`\`
345345
346-
There are also nice bindings for Relay and Rails.
346+
其也有对于 Relay Rails 的良好绑定。
347347
348348
### Scala
349349
350-
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)): A Scala GraphQL library that supports [Relay](https://facebook.github.io/relay/).
350+
#### [Sangria](http://sangria-graphql.org/) ([github](https://github.com/sangria-graphql/sangria)):支持 [Relay](https://facebook.github.io/relay/) 的一个 Scala GraphQL 库。
351351
352-
An example of a hello world GraphQL schema and query with \`sangria\`:
352+
使用的 \`sangria\` 的一个 GraphQL schema 以及 hello world 查询:
353353
354354
\`\`\`scala
355355
import sangria.schema._
@@ -367,7 +367,7 @@ val query = graphql"{ hello }"
367367
Executor.execute(schema, query) map println
368368
\`\`\`
369369
370-
## GraphQL Clients
370+
## GraphQL 客户端
371371
372372
- [C# / .NET](#c-net-1)
373373
- [Go](#go-1)
@@ -377,37 +377,37 @@ Executor.execute(schema, query) map println
377377
378378
### C# / .NET
379379
380-
- [graphql-net-client](https://github.com/bkniffler/graphql-net-client): Basic example GraphQL client for .NET.
380+
- [graphql-net-client](https://github.com/bkniffler/graphql-net-client):基于 .Net 的 GraphQL 客户端基本样例。
381381
382382
### Go
383383
384-
- [graphql](https://github.com/shurcooL/graphql#readme): A GraphQL client implementation in Go.
384+
- [graphql](https://github.com/shurcooL/graphql#readme): 一个使用 Go 编写的 GraphQL 客户端实现。
385385
386386
### Java / Android
387387
388-
- [Apollo Android](https://github.com/apollographql/apollo-android): A strongly-typed, caching GraphQL client for Android, written in Java.
388+
- [Apollo Android](https://github.com/apollographql/apollo-android):一个用于 Android 的 GraphQL 客户端,强类型、带缓存功能,使用 Java 编写。
389389
390390
### JavaScript
391391
392-
- [Relay](https://facebook.github.io/relay/) ([github](https://github.com/facebook/relay)) ([npm](https://www.npmjs.com/package/react-relay)): Facebook's framework for building React applications that talk to a GraphQL backend.
393-
- [Apollo Client](http://dev.apollodata.com/react/) ([github](https://github.com/apollostack/apollo-client)): A powerful JavaScript GraphQL client, designed to work well with React, React Native, Angular 2, or just plain JavaScript.
394-
- [graphql-request](https://github.com/graphcool/graphql-request): A simple and flexible JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native) - basically a lightweight wrapper around \`fetch\`.
395-
- [Lokka](https://github.com/kadirahq/lokka): A simple JavaScript GraphQL client that works in all JavaScript environments (the browser, Node.js, and React Native).
392+
- [Relay](https://facebook.github.io/relay/) ([github](https://github.com/facebook/relay)) ([npm](https://www.npmjs.com/package/react-relay))Facebook 的框架,用于构建与 GraphQL 后端交流的 React 应用。
393+
- [Apollo Client](http://dev.apollodata.com/react/) ([github](https://github.com/apollostack/apollo-client)):一个强大的 JavaScript GraphQL 客户端,设计用于与 ReactReact NativeAngular 2 或者原生 JavaScript 一同工作。
394+
- [graphql-request](https://github.com/graphcool/graphql-request):个简单的弹性的 JavaScript GraphQL 客户端,可以运行于所有的 JavaScript 环境(浏览器,Node.js React Native)—— 基本上是 \`fetch\` 的轻度封装。
395+
- [Lokka](https://github.com/kadirahq/lokka):一个简单的 JavaScript GraphQL 客户端,可以运行于所有的 JavaScript 环境 —— 浏览器,Node.js React Native
396396
397397
### Swift / Objective-C iOS
398398
399-
- [Apollo iOS](http://dev.apollodata.com/ios/) ([github](https://github.com/apollostack/apollo-ios)): A GraphQL client for iOS that returns results as query-specific Swift types, and integrates with Xcode to show your Swift source and GraphQL side by side, with inline validation errors.
400-
- [GraphQL iOS](https://github.com/funcompany/graphql-ios): An Objective-C GraphQL client for iOS.
399+
- [Apollo iOS](http://dev.apollodata.com/ios/) ([github](https://github.com/apollostack/apollo-ios)):一个用于 iOS 的 GraphQL 客户端,返回查询特定的 Swift 类型,与 Xcode 集成后可以分屏显示你的 Swift 源代码和 GraphQL,并能在行内展示验证错误。
400+
- [GraphQL iOS](https://github.com/funcompany/graphql-ios): 一个用于 iOS 的 Objective-C GraphQL 客户端。
401401
402-
## Tools
402+
## 工具
403403
404-
- [graphiql](https://github.com/graphql/graphiql) ([npm](https://www.npmjs.com/package/graphiql)): An interactive in-browser GraphQL IDE.
405-
- [libgraphqlparser](https://github.com/graphql/libgraphqlparser): A GraphQL query language parser in C++ with C and C++ APIs.
406-
- [Graphql Language Service](https://github.com/graphql/graphql-language-service): An interface for building GraphQL language services for IDEs (diagnostics, autocomplete etc).
404+
- [graphiql](https://github.com/graphql/graphiql) ([npm](https://www.npmjs.com/package/graphiql)):一个交互式的运行于浏览器中的 GraphQL IDE.
405+
- [libgraphqlparser](https://github.com/graphql/libgraphqlparser):一个 C++ 版 GraphQL 查询语言分析器,提供 C 和 C++ API。
406+
- [Graphql Language Service](https://github.com/graphql/graphql-language-service):一个用于构建 IDE 的 GraphQL 语言服务(诊断、自动完成等)的接口。
407407
408-
## More Stuff
408+
## 更多内容
409409
410-
- [awesome-graphql](https://github.com/chentsulin/awesome-graphql): A fantastic community maintained collection of libraries, resources, and more.
410+
- [awesome-graphql](https://github.com/chentsulin/awesome-graphql):一个神奇的社区,维护一系列库、资源等。
411411
412412
`}</Marked>
413413

0 commit comments

Comments
 (0)