Skip to content

Commit

Permalink
Merge pull request #2280 from apollographql/re-stage-pr-1971
Browse files Browse the repository at this point in the history
Re-land: Fastify integration from #1971.
  • Loading branch information
abernix committed Feb 14, 2019
2 parents 0c83e7b + f988a30 commit 939918a
Show file tree
Hide file tree
Showing 41 changed files with 1,840 additions and 38 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,7 @@

### vNEXT

- `apollo-server-fastify` is now on Apollo Server and lives within the `apollo-server` repository. This is being introduced in a _patch_ version, however it's a _major_ version bump from the last time `apollo-server-fastify` was published under `1.0.2`. [PR #1971](https://github.com/apollostack/apollo-server/pull/1971)
- Move `apollo-graphql` package to the `apollo-tooling` repository [PR #2316](https://github.com/apollographql/apollo-server/pull/2316)

### v2.4.1
Expand Down
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -86,6 +86,7 @@ Often times, Apollo Server needs to be run with a particular integration. To sta
- `apollo-server-express`
- `apollo-server-koa`
- `apollo-server-hapi`
- `apollo-server-fastify`
- `apollo-server-lambda`
- `apollo-server-azure-functions`
- `apollo-server-cloud-functions`
Expand Down Expand Up @@ -235,6 +236,25 @@ new ApolloServer({
})
```

## Fastify

```js
const { ApolloServer, gql } = require('apollo-server-fastify');
const { typeDefs, resolvers } = require('./module');

const server = new ApolloServer({
typeDefs,
resolvers,
});

const app = require('fastify')();

(async function () {
app.register(server.createHandler());
await app.listen(3000);
})();
```

### AWS Lambda

Apollo Server can be run on Lambda and deployed with AWS Serverless Application Model (SAM). It requires an API Gateway with Lambda Proxy Integration.
Expand Down

0 comments on commit 939918a

Please sign in to comment.