update TypeScript dependencies and documentation (#74)

* update TypeScript dependencies and documentation

* update typescript documentation
This commit is contained in:
Nick Nance 2016-08-02 10:04:15 -07:00 committed by Jonas Helfer
parent 02ff573743
commit 1cfe283926
3 changed files with 17 additions and 5 deletions

View file

@ -23,6 +23,15 @@ Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](./
Apollo Server is super-easy to set up. Just npm-install apollo-server, write a GraphQL schema, and then use one of the following snippets to get started. For more info, read the [Apollo Server docs](http://docs.apollostack.com/apollo-server).
### TypeScript
If you want to build your GraphQL server using TypeScript, Apollo Server is the project for you.
```sh
npm install apollo-server
typings i -SG dt~express dt~express-serve-static-core dt~serve-static dt~mime dt~hapi dt~cookies dt~koa
```
### Express
```js
@ -114,6 +123,7 @@ Apollo Server and express-graphql are more or less the same thing (GraphQL middl
* Compared to express-graphql, Apollo Server has a simpler interface and supports exactly one way of passing queries.
* Apollo Server separates serving GraphiQL (GraphQL UI) from responding to GraphQL requests.
* express-graphql contains code for parsing HTTP request bodies, Apollo Server leaves that to standard packages like body-parser.
* Built with TypeScript
Despite express-graphql being a reference implementation, Apollo Server is actually easier to understand and more modular than express-graphql.

View file

@ -1,3 +1,5 @@
export { runQuery } from './core/runQuery'
export { renderGraphiQL} from './modules/renderGraphiQL'
export { apolloExpress, graphiqlExpress } from './integrations/expressApollo';
export { ApolloHAPI, GraphiQLHAPI } from './integrations/hapiApollo';
export { apolloKoa, graphiqlKoa } from './integrations/koaApollo';

View file

@ -1,13 +1,13 @@
{
"dependencies": {
"chai": "registry:npm/chai#3.5.0+20160415060238",
"chai": "registry:npm/chai#3.5.0+20160723033700",
"graphql": "github:nitintutlani/typed-graphql#ffe7e46e2249cc8f3824a5d15a44938f4354afe9",
"http-errors": "registry:npm/http-errors#1.4.0+20160305200728"
"http-errors": "registry:npm/http-errors#1.4.0+20160723033700"
},
"globalDependencies": {
"body-parser": "registry:dt/body-parser#0.0.0+20160619023215",
"cookies": "registry:dt/cookies#0.5.1+20160316171810",
"connect": "registry:dt/connect#3.4.0+20160317120654",
"cookies": "registry:dt/cookies#0.5.1+20160316171810",
"express": "registry:dt/express#4.0.0+20160708185218",
"express-serve-static-core": "registry:dt/express-serve-static-core#4.0.0+20160715232503",
"hapi": "registry:dt/hapi#13.0.0+20160709092105",
@ -16,8 +16,8 @@
"koa-router": "registry:dt/koa-router#7.0.0+20160314083221",
"mime": "registry:dt/mime#0.0.0+20160316155526",
"mocha": "registry:dt/mocha#2.2.5+20160720003353",
"multer": "registry:dt/multer#0.0.0+20160317120654",
"node": "registry:dt/node#6.0.0+20160720070758",
"multer": "registry:dt/multer#0.0.0+20160726135055",
"node": "registry:dt/node#6.0.0+20160801161248",
"serve-static": "registry:dt/serve-static#0.0.0+20160606155157"
}
}