graphql-python / graphql-python/graphql-core
I use middleware for that right now
- 主要語言
- Python
- 星號
- 531
- 分支
- 146
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I use middleware for that right now
```python
class HideIntrospectMiddleware:
"""
This middleware should use for production mode. This class hide the
introspection.
"""
def resolve(self, next, root, info, **args):
if info.field_name == '__schema':
return None
return next(root, info, **args)
```
Originally posted by @Arfey in a [Graphene issue](https://github.com/graphql-python/graphene/issues/907#issuecomment-484014679), but it gives an error "Cannot return null for non-nullable field Query.__schema."
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
檢視 middleware 範例和連結的 Graphene 討論,接著追蹤 Query.__schema 的處理方式,以及為什麼回傳 null 會違反其非空型別。重現回報的錯誤,並在定義回歸涵蓋範圍和完成標準之前,釐清停用內省時的預期行為。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- graphql, python
- 領域
- api, security
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100