graphql-python / graphql-python/graphql-core-legacy

Subscription must return Async Iterable or Observable. Received:

Abierto
#149 26 comentarios 11 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
372
Forks
175
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hello, I have previously gotten subscriptions to crudely work https://github.com/graphql-python/graphene/pull/500#issuecomment-325560994

But now i want to try the new version of the graphql-core library and here is how far I've gotten. It is not very clear to me what a Async Iterable is meant to be I assumed that its a Async generator?

but from this line it seems to be anything that is an instance of an Observable
https://github.com/graphql-python/graphql-core/blob/0b0551e7dfb724dedc66759145b9221595ec8598/graphql/execution/executor.py#L296
Is there any documentation for graphql-cores new approach to subscriptions .. I would very much like to learn more.

Here is what im trying
```
[GraphQLError('Subscription must return Async Iterable or Observable. Received: .compat at 0x7f6335e89d48>',)]

def resolve_sub_product(self, info, **input):
async def compat(result, delay):
yield result
await asyncio.sleep(delay)
return compat(make_sub(info, input.get('product')), .1)
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza por graphql/execution/executor.py alrededor de la línea 296 y revisa el enfoque de graphql-core para las subscriptions indicado en el enlace. Documenta qué valores de retorno son compatibles, incluidos los async iterables y los Observables, y explica cómo debe entenderse el async-generator resolver mostrado. El trabajo estará terminado cuando una persona nueva pueda determinar cómo implementar una subscription sin depender del hilo de discusión.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
api
Tipo de issue
Documentación
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.