Skip to content

Commit c32d79f

Browse files
committed
apollo-server-fastify: update README, left out of #5635 by accident
1 parent 1fc6b6b commit c32d79f

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

packages/apollo-server-fastify/README.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,9 @@
66

77
This is the Fastify integration of GraphQL Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node.js HTTP server frameworks. [Read the docs](https://www.apollographql.com/docs/apollo-server/). [Read the CHANGELOG.](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
88

9-
```shell
10-
npm install apollo-server-fastify graphql
11-
```
12-
13-
## Fastify
14-
159
As of Apollo Server 3, this package supports Fastify v3 only.
1610

17-
```js
18-
const { ApolloServer, gql } = require('apollo-server-fastify');
19-
const { typeDefs, resolvers } = require('./module');
20-
21-
const server = new ApolloServer({
22-
typeDefs,
23-
resolvers,
24-
});
25-
26-
const app = require('fastify')();
27-
28-
(async function () {
29-
await server.start();
30-
app.register(server.createHandler());
31-
await app.listen(3000);
32-
})();
33-
```
11+
A full example of how to use `apollo-server-fastify` can be found in [the docs](https://www.apollographql.com/docs/apollo-server/integrations/middleware/#apollo-server-fastify).
3412

3513
## Principles
3614

0 commit comments

Comments
 (0)