graphql-python / graphql-python/graphql-ws

GeventSubscriptionServer ignore schema validation errors

オープン
#52 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。