Before deploying your GraphQL app to production you should disable
Why are they a problem?
They can reveal sensitive information (e.g. internal business logic)
They make it easier for malicious parties to reverse engineer your GraphQL API
How to disable them
GraphiQL is useful during testing and development but should be disabled in production by default.
It can be turned off by setting the
graphiql option to
See the Strawberry Options documentation for the integration you are using for more information on how to disable it:
Introspection should primarily be used as a discovery and diagnostic tool for testing and development, and should be disabled in production by default.
You can disable introspection by adding a validation rule extension.
Strawberry provides some security extensions to limit various aspects of the GraphQL document. These are recommended in production.
See the documentation for the integration you are using for more information on deployment:
The docs for ASGI and Starlette do not provide an official deployment guide, but you may find the documentation for other frameworks that use ASGI servers useful (e.g. FastAPI)