Skip to content

django-debug-toolbar

This integration provides integration between the Django Debug Toolbar and strawberry, allowing it to display stats like SQL Queries, CPU Time, Cache Hits, etc for queries and mutations done inside the graphiql page.

To use it, make sure you have the Django Debug Toolbar installed and configured, then change its middleware settings from:

settings.py
1
2
3
4
5
MIDDLEWARE = [
    ...
    "debug_toolbar.middleware.DebugToolbarMiddleware",
    ...
]

To:

settings.py
1
2
3
4
5
MIDDLEWARE = [
    ...
    "strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware",
    ...
]

Finally, ensure app "strawberry_django" is added to your INSTALLED_APPS in Django settings.