I use middleware for that right now
amansingh0912 opened this issue · comments
amansingh0912 commented
I use middleware for that right now
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, but it gives an error "Cannot return null for non-nullable field Query.__schema."
Christoph Zwerschke commented
Can you please change the title and description to make this an actually relevant issue. Is this a request, bug report, or suggestion?