Skip to content

Commit f8f0260

Browse files
docs(graphql): update apollo packages, migration guide
1 parent bda01cf commit f8f0260

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

content/graphql/migration.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
1-
### Migrating to v10
1+
### Migrating to v11 from v10
22

3-
This article provides a set of guidelines for migrating from `@nestjs/graphql` version 9 to version 10. The focus of this major-version release is to provide a lighter, platform-agnostic core library.
3+
This chapter provides a set of guidelines for migrating from `@nestjs/graphql` version 10 to version 11. As part of this major release, we updated the Apollo driver to be compatible with Apollo Server v4 (instead of v3). Note: there are several breaking changes in Apollo Server v4 (especially around plugins and ecosystem packages), so you'll have to update your codebase accordingly. For more information, see the [Apollo Server v4 migration guide](https://www.apollographql.com/docs/apollo-server/migration/).
4+
5+
#### Apollo packages
6+
7+
Instead of installing the `apollo-server-express` package, you'll have to install the `@apollo/server` instead:
8+
9+
```bash
10+
$ npm uninstall apollo-server-express
11+
$ npm install @apollo/server
12+
```
13+
14+
If you use the Fastify adapter, you'll have to install the `@as-integrations/fastify` package instead:
15+
16+
```bash
17+
$ npm uninstall apollo-server-fastify
18+
$ npm install @apollo/server @as-integrations/fastify
19+
```
20+
21+
#### Mercurius packages
22+
23+
Mercurius gateway is no longer a part of the `mercurius` package. Instead, you'll have to install the `@mercuriusjs/gateway` package separately:
24+
25+
```bash
26+
$ npm install @mercuriusjs/gateway
27+
```
28+
29+
Similarly, for creating federated schemas, you'll have to install the `@mercuriusjs/federation` package:
30+
31+
```bash
32+
$ npm install @mercuriusjs/federation
33+
```
34+
35+
### Migrating to v10 from v9
36+
37+
This chapter provides a set of guidelines for migrating from `@nestjs/graphql` version 9 to version 10. The focus of this major-version release is to provide a lighter, platform-agnostic core library.
438

539
#### Introducing "driver" packages
640

content/graphql/quick-start.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Start by installing the required packages:
1212

1313
```bash
1414
# For Express and Apollo (default)
15-
$ npm i @nestjs/graphql @nestjs/apollo graphql apollo-server-express
15+
$ npm i @nestjs/graphql @nestjs/apollo @apollo/server graphql
1616

1717
# For Fastify and Apollo
18-
# npm i @nestjs/graphql @nestjs/apollo graphql apollo-server-fastify
18+
# npm i @nestjs/graphql @nestjs/apollo @apollo/server @as-integrations/fastify graphql
1919

2020
# For Fastify and Mercurius
2121
# npm i @nestjs/graphql @nestjs/mercurius graphql mercurius

0 commit comments

Comments
 (0)