Akryum / Akryum/vue-cli-plugin-apollo
Uncaught DOMException: Failed to construct 'WebSocket': The URL 'undefined' is invalid.
- 主要言語
- JavaScript
- スター
- 477
- フォーク
- 109
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
version 0.20.0
When wsEndpoint is added to the _createProvider_ configuration this error is returned
`Uncaught DOMException: Failed to construct 'WebSocket': The URL 'undefined' is invalid.`

The reason is that wsClient created in `./node_modules/vue-cli-plugin-apollo/graphql-client/dist/index.js` uses a different SubscriptionClient constructor than apollo-link-ws. Hence this check fails

A new SubscriptionClient is created passing paramsOrClient.uri, which is undefined.
paramsOrClient exposes .url, not .uri.
apollo-link-ws uses SubscriptionClient from `./node_modules/subscriptions-transport-ws`

while `./node_modules/vue-cli-plugin-apollo/graphql-client/dist/index.js` uses SubscriptionClient from `./node_modules/vue-cli-plugin-apollo/node_modules/subscriptions-transport-ws`

Manually removing` ./node_modules/vue-cli-plugin-apollo/node_modules/subscriptions-transport-ws` fixes it in that webpack uses ./node_modules/subscriptions-transport-ws for both.
I think the plugin should be released without subscriptions-transport-ws in node_modules
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。