Skip to content

Commit 3ead7fd

Browse files
committed
upgrade to express5
1 parent 40b5fd9 commit 3ead7fd

File tree

9 files changed

+123
-106
lines changed

9 files changed

+123
-106
lines changed

examples/assets-local/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"dependencies": {
1313
"@keystone-6/core": "^6.5.1",
1414
"@prisma/client": "6.5.0",
15-
"@types/express": "^4.17.14",
1615
"bytes": "^3.1.1",
17-
"express": "^4.19.2"
16+
"express": "^5.0.0"
1817
},
1918
"devDependencies": {
2019
"@types/bytes": "^3.1.1",
20+
"@types/express": "^5.0.0",
2121
"prisma": "6.5.0",
2222
"typescript": "^5.5.0"
2323
}

examples/custom-session-passport/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"@keystone-6/core": "^6.5.1",
1414
"@prisma/client": "6.5.0",
1515
"dotenv": "^16.0.0",
16-
"express": "^4.19.2",
16+
"express": "^5.0.0",
1717
"passport": "^0.7.0",
1818
"passport-github2": "^0.1.12"
1919
},
2020
"devDependencies": {
21-
"@types/express": "^4.17.14",
21+
"@types/express": "^5.0.0",
2222
"@types/passport": "^1.0.16",
2323
"@types/passport-github2": "^1.2.9",
2424
"@types/passport-oauth2": "^1.4.16",

examples/extend-express-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"dependencies": {
1313
"@keystone-6/core": "^6.5.1",
1414
"@prisma/client": "6.5.0",
15-
"@types/express": "^4.17.14",
16-
"express": "^4.19.2"
15+
"express": "^5.0.0"
1716
},
1817
"devDependencies": {
18+
"@types/express": "^5.0.0",
1919
"prisma": "6.5.0",
2020
"tsx": "^4.0.0",
2121
"typescript": "^5.5.0"

packages/core/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@
235235
"dependencies": {
236236
"@apollo/cache-control-types": "^1.0.3",
237237
"@apollo/client": "^3.12.2",
238-
"@apollo/server": "^4.10.0",
238+
"@apollo/server": "^4.12.1",
239+
"@as-integrations/express5": "^1.1.1",
239240
"@babel/runtime": "^7.24.7",
240241
"@graphql-ts/extend": "^2.0.0",
241242
"@graphql-ts/schema": "^1.0.0",

packages/core/src/lib/createExpressServer.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
import { type Server, createServer } from 'http'
2-
import cors from 'cors'
31
import { json } from 'body-parser'
4-
import { expressMiddleware } from '@apollo/server/express4'
2+
import cors from 'cors'
53
import express from 'express'
64
import { GraphQLError, type GraphQLFormattedError } from 'graphql'
7-
import { type ApolloServerOptions, ApolloServer } from '@apollo/server'
5+
import { type Server, createServer } from 'http'
6+
7+
import { ApolloServer, type ApolloServerOptions } from '@apollo/server'
88
import { ApolloServerPluginLandingPageDisabled } from '@apollo/server/plugin/disabled'
99
import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default'
10+
import { expressMiddleware } from '@as-integrations/express5'
11+
1012
// @ts-expect-error
1113
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.js'
12-
import type { KeystoneContext, KeystoneConfig } from '../types'
14+
import type { KeystoneConfig, KeystoneContext } from '../types'
1315

1416
/*
1517
NOTE: This creates the main Keystone express server, including the

0 commit comments

Comments
 (0)