Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/@vue/cli-ui/graphql-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function autoCall (fn, ...context) {
return fn
}

module.exports = (options, cb = null) => {
module.exports = async (options, cb = null) => {
// Default options
options = merge({
integratedEngine: false
Expand Down Expand Up @@ -146,6 +146,7 @@ module.exports = (options, cb = null) => {

// Apollo Server
const server = new ApolloServer(apolloServerOptions)
await server.start()

// Express middleware
server.applyMiddleware({
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@achrinza/node-ipc": "^9.2.5",
"@akryum/winattr": "^3.0.0",
"@vue/cli-shared-utils": "^5.0.6",
"apollo-server-express": "^2.21.0",
"apollo-server-express": "^3.9.0",
"clone": "^2.1.1",
"deepmerge": "^4.2.2",
"express": "^4.17.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli/lib/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function ui (options = {}, context = process.cwd()) {
}
}

const { httpServer } = server(opts, () => {
const { httpServer } = await server(opts, () => {
// Reset for yarn/npm to work correctly
if (typeof nodeEnv === 'undefined') {
delete process.env.NODE_ENV
Expand Down
Loading