graphql-python / graphql-python/graphql-core
I use middleware for that right now
- Vorherrschende Sprache
- Python
- Sterne
- 531
- Forks
- 146
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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."
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.