Skip to content

Commit e7a408b

Browse files
committed
chore: upgrade to apollo-server-express 3.x
Fixes vuejs#7198
1 parent ef08a08 commit e7a408b

File tree

4 files changed

+221
-8
lines changed

4 files changed

+221
-8
lines changed

packages/@vue/cli-ui/graphql-server.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function autoCall (fn, ...context) {
1919
return fn
2020
}
2121

22-
module.exports = (options, cb = null) => {
22+
module.exports = async (options, cb = null) => {
2323
// Default options
2424
options = merge({
2525
integratedEngine: false
@@ -146,6 +146,7 @@ module.exports = (options, cb = null) => {
146146

147147
// Apollo Server
148148
const server = new ApolloServer(apolloServerOptions)
149+
await server.start()
149150

150151
// Express middleware
151152
server.applyMiddleware({

packages/@vue/cli-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@achrinza/node-ipc": "^9.2.5",
3838
"@akryum/winattr": "^3.0.0",
3939
"@vue/cli-shared-utils": "^5.0.6",
40-
"apollo-server-express": "^2.21.0",
40+
"apollo-server-express": "^3.9.0",
4141
"clone": "^2.1.1",
4242
"deepmerge": "^4.2.2",
4343
"express": "^4.17.1",

packages/@vue/cli/lib/ui.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function ui (options = {}, context = process.cwd()) {
6868
}
6969
}
7070

71-
const { httpServer } = server(opts, () => {
71+
const { httpServer } = await server(opts, () => {
7272
// Reset for yarn/npm to work correctly
7373
if (typeof nodeEnv === 'undefined') {
7474
delete process.env.NODE_ENV

0 commit comments

Comments
 (0)