Skip to content

Commit

Permalink
feat(fastify) Apollo Fastify server integration resolve apollographql…
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorrelboom committed Nov 22, 2018
1 parent 9beef0c commit 6fc502b
Show file tree
Hide file tree
Showing 18 changed files with 1,789 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ client reference ID, Apollo Server will now default to the values present in the
of the request (`apollographql-client-name`, `apollographql-client-reference-id` and
`apollographql-client-version` respectively). As a last resort, when those headers are not set,
the query extensions' `clientInfo` values will be used. [PR #1960](https://github.com/apollographql/apollo-server/pull/1960)
- Added `apollo-server-fastify` integration ([@rkorrelboom](https://github.com/rkorrelboom) in [#1971](https://github.com/apollostack/apollo-server/pull/1971))

### v2.2.2

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,29 @@ new ApolloServer({
})
```

## Fastify

```js
const { ApolloServer, gql } = require('apollo-server-fastify');
const fastify = require('fastify');

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

const app = fastify();

await server.applyMiddleware({
app,
});

await server.installSubscriptionHandlers(app.server);

await app.listen(3000);
}

StartServer().catch(error => console.log(error));
```

### 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
Loading

0 comments on commit 6fc502b

Please sign in to comment.