strawberry-django-plus¶
Enhanced Strawberry integration with Django.
Built on top of strawberry-django integration, enhancing its overall functionality.
Warning
All the extra features provided by this lib were contributed and merged directly into the official strawberry-graphql-django lib. Since then this lib is deprecated and the official integration should be used instead and development will continue there!
If you were using this lib before, check out the migration guide for more information on how to migrate your code.
Features¶
- All supported features by
strawberry
andstrawberry-django
. - Query optimizer extension that automatically optimizes querysets (using
only
/select_related
/prefetch_related
) to solve graphqlN+1
problems, with support for fragment spread, inline fragments,@include
/@skip
directives, prefetch merging, etc - Django choices enums using support for better enum typing (requires django-choices-field)
- Permissioned resolvers using schema directives, supporting both django authentication system, direct and per-object permission checking for backends that implement those (e.g. django-guardian).
- Mutations for Django, with CRUD support and automatic errors validation.
- Relay support for queries, connections and input mutations, all integrated with django types directly.
- Django Debug Toolbar integration with graphiql to display metrics like SQL queries
- Improved sync/async resolver that priorizes the model's cache to avoid have to use sync_to_async when not needed.
- A well typed and documented API.
Installation¶
Install with pip:
pip install strawberry-django-plus
How to¶
You can now jump to the quickstart to learn how to use this lib.