Anyone is welcome to contribute to Apollo Server, just read [CONTRIBUTING.md](./CONTRIBUTING.md), take a look at the [roadmap](./ROADMAP.md) and make your first PR!
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).
### Express
```js
import express from 'express';
import { apolloExpress } from 'apollo-server';
const myGraphQLSchema = // ... define or import your schema here!
Apollo Server can be configured with an options oject with the the following fields:
* **schema**: the GraphQLSchema to be used
* **context**: the context value passed to resolvers during GraphQL execution
* **rootValue**: the value passed to the first resolve function
* **formatError**: a function to apply to every error before sending the response to clients
* **validationRules**: additional GraphQL validation rules to be applied to client-specified queries
* **formatParams**: a function applied for each query in a batch to format parameters before execution
* **formatResponse**: a function applied to each response after execution
All options except for `schema` are optional.
## Differences to express-graphql
Apollo Server and express-graphql are more or less the same thing (GraphQL middleware for Node.js), but there are a few key differences:
* express-graphql works with Express and Connect, Apollo Server supports Express, Connect, HAPI and Koa.
* express-graphql's main goal is to be a minimal reference implementation, whereas Apollo Server's goal is to be a complete production-ready GraphQL server.
* 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.
That said, Apollo Server is heavily inspired by express-graphql (it's the reference implementation after all). Rather than seeing the two as competing alternatives, we think that they both have separate roles in the GraphQL ecosystem: express-graphql is a reference implementation, and Apollo Server is a GraphQL server to be used in production and evolve quickly with the needs of the community. Over time, express-graphql can adopt those features of Apollo Server that have proven their worth and become established more widely.