graphql-python / graphql-python/graphql-ws

Flask SocketIO Implementation

オープン
#50 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
270
フォーク
85
PR マージ指標
30日以内にマージされた PR はありません

説明

* GraphQL AioWS version: 0.3.1
* Python version: 3.7
* Operating System: MacOS 10.15.5

### Description

I have the flask subscription example up and running and everything worked perfect. I'm trying to get it to work using flask socketio without any luck. Has anybody else ran into this using flask socketio? I feel like it's probably really obvious but I've searched pretty extensively with no luck.

Here is the original flask example(I left out the rest of the file since it's identical to the example) with the flask sockets commented out.

#sockets = Sockets(app)
socket_io = SocketIO(app)

# @sockets.route('/subscriptions')
# def echo_socket(ws):
# subscription_server.handle(ws)
# return []

@socket_io.on('subscriptions', namespace='/subscriptions')
def echo_socket(ws):
subscription_server.handle(ws)
return []

There was no errors, but also nothing returned in GraphiQL when I tested the subscription.

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

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

評価

この issue はまだ評価されていません。

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

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