Skip to content

Commit 873d14d

Browse files
author
Guillaume Chau
committed
feat(ui): update to latest vue-cli-plugin-apollo
1 parent 80c2c7a commit 873d14d

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

packages/@vue/cli-ui/.env.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VUE_APP_GRAPHQL_WS=
1+
VUE_CLI_UI_URL=

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"semver": "^5.5.0",
3232
"shortid": "^2.2.8",
3333
"terminate": "^2.1.0",
34-
"vue-cli-plugin-apollo": "^0.10.0",
34+
"vue-cli-plugin-apollo": "^0.11.0",
3535
"watch": "^1.0.2"
3636
},
3737
"devDependencies": {

packages/@vue/cli-ui/src/graphql-api/connectors/client-addons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { resolveModuleRoot } = require('../utils/resolve-path')
66

77
let addons = []
88

9-
let baseUrl = process.env.VUE_APP_GRAPHQL_WS
9+
let baseUrl = process.env.VUE_CLI_UI_URL
1010
if (typeof baseUrl === 'undefined') {
1111
baseUrl = 'http://localhost:4000'
1212
} else {

packages/@vue/cli-ui/src/vue-apollo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createApolloClient } from 'vue-cli-plugin-apollo/graphql-client'
55
// Install the vue plugin
66
Vue.use(VueApollo)
77

8-
let endpoint = process.env.VUE_APP_GRAPHQL_WS
8+
let endpoint = process.env.VUE_CLI_UI_URL
99
if (typeof endpoint === 'undefined') {
1010
endpoint = 'ws://localhost:4000/graphql'
1111
} else if (endpoint === '') {

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ async function ui (options = {}, context = process.cwd()) {
88
}
99

1010
// Config
11-
process.env.VUE_APP_GRAPHQL_PORT = port
12-
process.env.VUE_APP_GRAPHQL_WS = ''
13-
process.env.VUE_APP_GRAPHQL_PLAYGROUND_PATH = '/graphql-playground'
11+
process.env.VUE_CLI_UI_URL = ''
1412

1513
if (!options.dev) {
1614
process.env.NODE_ENV = 'production'
@@ -21,6 +19,11 @@ async function ui (options = {}, context = process.cwd()) {
2119
server = server.default || server
2220

2321
const opts = {
22+
port,
23+
graphqlPath: '/graphql',
24+
graphqlSubscriptionsPath: '/graphql',
25+
graphqlPlaygroundPath: '/graphql-playground',
26+
graphqlCors: '*',
2427
mock: false,
2528
apolloEngine: false,
2629
timeout: 1000000,
@@ -35,7 +38,7 @@ async function ui (options = {}, context = process.cwd()) {
3538
}
3639

3740
server(opts, () => {
38-
const url = `http://localhost:${process.env.VUE_APP_GRAPHQL_PORT}`
41+
const url = `http://localhost:${port}`
3942
if (!options.quiet) log(`🌠 Ready on ${url}`)
4043
if (options.headless) {
4144
console.log(port)

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11442,9 +11442,9 @@ vue-class-component@^6.0.0:
1144211442
version "6.2.0"
1144311443
resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-6.2.0.tgz#7adb1daa9a868c75f30f97f33f4f1b94aee62089"
1144411444

11445-
vue-cli-plugin-apollo@^0.10.0:
11446-
version "0.10.3"
11447-
resolved "https://registry.yarnpkg.com/vue-cli-plugin-apollo/-/vue-cli-plugin-apollo-0.10.3.tgz#4b43c33fe64eae21c5b321fe3b0a475e12897f9c"
11445+
vue-cli-plugin-apollo@^0.11.0:
11446+
version "0.11.0"
11447+
resolved "https://registry.yarnpkg.com/vue-cli-plugin-apollo/-/vue-cli-plugin-apollo-0.11.0.tgz#13d390006fd44245ce4914548a0d4a11bf5198bf"
1144811448
dependencies:
1144911449
apollo-cache-inmemory "^1.2.1"
1145011450
apollo-client "^2.3.1"

0 commit comments

Comments
 (0)