Akryum / Akryum/vue-cli-plugin-apollo

Using vue-apollo.js or vue.config.js to serve graphql apollo server over https ?

未关闭
#84 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
JavaScript
星标
477
派生
109
PR 合并指标
30 天内没有已合并 PR

描述

I must be missing something obvious or simple, but I just cannot figure out how to get the graphql server to run over https.

I made a test app using Vue CLI 3 (vue create test-app). I add vue-apollo plugin using CLI (vue add apollo).

In the sample code in vue-apollo.js it mentions:

`const defaultOptions = {
// You can use 'https' for secure connection (recommended in production)
httpEndpoint,...`

But I cannot see how to adjust that option. I assumed you could do it through the options in that file or through vue.config.js -- but maybe I'm wrong?

In vue.config.js I have:
`module.exports = {
pluginOptions: {
apollo: {
enableMocks: false,
enableEngine: false
}
},
devServer: {
disableHostCheck: true,
https: true
}
}`

The devServer runs on https at port 8000 with that option set.

What am I missing? I thought maybe it was related to this issue: [https://github.com/Akryum/vue-cli-plugin-apollo/issues/52](url)

But that seems to have been resolved. But maybe no option in vue.config.js can effect the server in the way I'm wanting. Is there a way to do this by passing in options somewhere through the vue-apollo plugin? Or is there some other method of which I am unaware. Thanks.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。