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."
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。