graphql-python / graphql-python/graphql-core
I use middleware for that right now
- Lingua principale
- Python
- Stelle
- 531
- Fork
- 146
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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."
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.