mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-05 22:48:27 -06:00
feat(ui): update to latest vue-cli-plugin-apollo
This commit is contained in:
@@ -1 +1 @@
|
||||
VUE_APP_GRAPHQL_WS=
|
||||
VUE_CLI_UI_URL=
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"semver": "^5.5.0",
|
||||
"shortid": "^2.2.8",
|
||||
"terminate": "^2.1.0",
|
||||
"vue-cli-plugin-apollo": "^0.10.0",
|
||||
"vue-cli-plugin-apollo": "^0.11.0",
|
||||
"watch": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -6,7 +6,7 @@ const { resolveModuleRoot } = require('../utils/resolve-path')
|
||||
|
||||
let addons = []
|
||||
|
||||
let baseUrl = process.env.VUE_APP_GRAPHQL_WS
|
||||
let baseUrl = process.env.VUE_CLI_UI_URL
|
||||
if (typeof baseUrl === 'undefined') {
|
||||
baseUrl = 'http://localhost:4000'
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { createApolloClient } from 'vue-cli-plugin-apollo/graphql-client'
|
||||
// Install the vue plugin
|
||||
Vue.use(VueApollo)
|
||||
|
||||
let endpoint = process.env.VUE_APP_GRAPHQL_WS
|
||||
let endpoint = process.env.VUE_CLI_UI_URL
|
||||
if (typeof endpoint === 'undefined') {
|
||||
endpoint = 'ws://localhost:4000/graphql'
|
||||
} else if (endpoint === '') {
|
||||
|
||||
@@ -8,9 +8,7 @@ async function ui (options = {}, context = process.cwd()) {
|
||||
}
|
||||
|
||||
// Config
|
||||
process.env.VUE_APP_GRAPHQL_PORT = port
|
||||
process.env.VUE_APP_GRAPHQL_WS = ''
|
||||
process.env.VUE_APP_GRAPHQL_PLAYGROUND_PATH = '/graphql-playground'
|
||||
process.env.VUE_CLI_UI_URL = ''
|
||||
|
||||
if (!options.dev) {
|
||||
process.env.NODE_ENV = 'production'
|
||||
@@ -21,6 +19,11 @@ async function ui (options = {}, context = process.cwd()) {
|
||||
server = server.default || server
|
||||
|
||||
const opts = {
|
||||
port,
|
||||
graphqlPath: '/graphql',
|
||||
graphqlSubscriptionsPath: '/graphql',
|
||||
graphqlPlaygroundPath: '/graphql-playground',
|
||||
graphqlCors: '*',
|
||||
mock: false,
|
||||
apolloEngine: false,
|
||||
timeout: 1000000,
|
||||
@@ -35,7 +38,7 @@ async function ui (options = {}, context = process.cwd()) {
|
||||
}
|
||||
|
||||
server(opts, () => {
|
||||
const url = `http://localhost:${process.env.VUE_APP_GRAPHQL_PORT}`
|
||||
const url = `http://localhost:${port}`
|
||||
if (!options.quiet) log(`🌠 Ready on ${url}`)
|
||||
if (options.headless) {
|
||||
console.log(port)
|
||||
|
||||
@@ -11442,9 +11442,9 @@ vue-class-component@^6.0.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-6.2.0.tgz#7adb1daa9a868c75f30f97f33f4f1b94aee62089"
|
||||
|
||||
vue-cli-plugin-apollo@^0.10.0:
|
||||
version "0.10.3"
|
||||
resolved "https://registry.yarnpkg.com/vue-cli-plugin-apollo/-/vue-cli-plugin-apollo-0.10.3.tgz#4b43c33fe64eae21c5b321fe3b0a475e12897f9c"
|
||||
vue-cli-plugin-apollo@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/vue-cli-plugin-apollo/-/vue-cli-plugin-apollo-0.11.0.tgz#13d390006fd44245ce4914548a0d4a11bf5198bf"
|
||||
dependencies:
|
||||
apollo-cache-inmemory "^1.2.1"
|
||||
apollo-client "^2.3.1"
|
||||
|
||||
Reference in New Issue
Block a user