graphql-python / graphql-python/graphql-ws

GeventSubscriptionServer ignore schema validation errors

未关闭
#52 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
270
派生
85
PR 合并指标
30 天内没有已合并 PR

描述

* GraphQL AioWS version: 0.3.1
* Python version: Python 3.8.5
* Operating System: Debian

### Description

GeventSubscriptionServer ignore any schema validation errors.
I use Altair GraphQL client. When I send subscription request with schema text errors (for example: wrong field name), this error is covered by GeventSubscriptionServer and just raise "A subscription must return an observable"

I think problem in following lines in `gevent.py`, line 74:75:

`
assert isinstance(execution_result, Observable), \
"A subscription must return an observable"
`

There's check only for Observable, but in case of schema error its return ExecutionResult object with errors, then assert is failed, another error is raising

### What I Did

Any subscription query with any schema error

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。