loopbackio / loopbackio/loopback-next

Could not connect to websocket error when using subscription in graphql example source code

オープン
#7,750 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug Examples
主要言語
TypeScript
スター
5.1k
フォーク
1.1k
平均マージ
2日 21時間
マージ済み PR(30日)
27

説明

I'm got this error with response when calling subscription in **graphql example** source code. Please check the error description and image bellow.
```
{
"error": "Could not connect to websocket endpoint ws://localhost:3000/subscriptions. Please check if the endpoint url is correct."
}
```
![image](https://user-images.githubusercontent.com/30214934/129315528-adcd4982-b26a-426b-b2ce-f07c80e3262b.png)

STEP TO REPRODUCE.

```
Step 1: Clone the loopback-next source code.
Step 2: Run npm install in the root of source code (not in the example directory)
Step 3: npm start and check the error when calling subscription.
```

System information
```
OS: Windows 10
CPU: AMD Ryzen 5
```

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず graphql の例で issue の再現手順に従い、subscription の WebSocket エンドポイントがどのように設定されているかを確認します。設定されたエンドポイントを ws://localhost:3000/subscriptions と比較し、subscription が正常に接続できることを確認してください。例で接続エラーが報告されなくなった時点で issue は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
graphql, nodejs, typescript
領域
api, backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。