graphql-python / graphql-python/graphql-core-legacy
Execute should return an awaitable with AsyncioExecutor
- 主要言語
- Python
- スター
- 372
- フォーク
- 175
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The current graphql.execution.execute.execute implementation forces AsyncioExecutor to use loop.run_until_complete in wait_until_finished. This is a bit ugly.
It would be better to let the executor decide what is returned from the execute method. It can be given a function to call after the data is ready as an argument.
With this AsyncioExecutor could return an awaitable and execute would be used as one would expect
`result = await execute(schema, ast, executor=AsyncioExecutor())`
It could even have an argument to get the new way to keep compatibility with existing uses.
This would also make TwistedExecutor much easier to implement.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
graphql.execution.execute.execute から始めて、AsyncioExecutor が wait_until_finished をどのように使用しているかを調べ、次に TwistedExecutor に関連する executor の統合ポイントを比較します。executor が post-data callback をどのように提供するか、また互換性をどのように維持するかを定義します。AsyncioExecutor が await execute で使用可能な awaitable を返せるようになり、既存の使用方法も引き続きサポートされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100