graphql-python / graphql-python/graphql-ws

Flask SocketIO Implementation

Abierto
#50 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
270
Forks
85
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

* 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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.