You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, `express.json()` in Express v5 now uses `body-parser@2`,
which initializes `req.body` to `undefined` instead of `{}`.
People can also use either major version of `body-parser` with either
version of Express, so we should support both versions here.
Fortunately, we can maintain this helpful advice for people with
misconfigured apps by looking to see if the field exists at all.
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
-
# Apollo Server Integration for Express v4
1
+
# Apollo Server Integration for Express v5
2
2
3
3
## **Introduction**
4
4
5
-
This package integrates Apollo Server v4 with version 4 of the Express web framework, by exporting a middleware that executes GraphQL operations.
5
+
This package integrates Apollo Server v4 with version 5 of the Express web framework, by exporting a middleware that executes GraphQL operations.
6
6
7
-
It is identical to the middleware exported at `@apollo/server/express4` from the core `@apollo/server` v4 package. It is being provided separately so that we can also provide an integration with Express v5 (`@as-integrations/express5`); future major versions of Apollo Server will not have built-in support for Express.
7
+
It is identical to the middleware exported at `@apollo/server/express5` from the core `@apollo/server` v4 package, updated to support Express v5 instead of Express v4.
8
8
9
9
## **Requirements**
10
10
11
11
-**[Node.js v20](https://nodejs.org/)** or later
12
-
-**[Express v4](https://expressjs.com/)**; this package does *not* support Express v5
12
+
-**[Express v5](https://expressjs.com/)**; see `@as-integrations/express4` for Express v4 support
13
13
-**[Apollo Server v4](https://www.apollographql.com/docs/apollo-server/)**
14
14
15
15
## **Installation**
16
16
17
17
```bash
18
-
npm install @apollo/server graphql express@4 @as-integrations/express4 cors
18
+
npm install @apollo/server graphql express@5 @as-integrations/express5 cors
19
19
```
20
20
21
21
## **Usage**
@@ -24,7 +24,7 @@ Set up [Express](https://expressjs.com/) & [Apollo Server](https://www.apollogra
0 commit comments