blb-ventures / strawberry-django-plus

Enhanced Strawberry GraphQL integration with Django
MIT License
179 stars 47 forks source link

hard dependency on django.contrib.auth #249

Closed devkral closed 1 year ago

devkral commented 1 year ago

The line in utils/typing.py:

UserType: TypeAlias = Union[AbstractUser, AnonymousUser]

requires the inclusion of "django.contrib.auth" in INSTALLED_APPS

it would be better to use the

AbstractBaseUser of django/contrib/auth/base_user.py as it doesn't require the inclusion and is even the base of AbstractUser, AnonymousUser and an extra UserType is not neccessary.

This also improves the compatibility with 3party user apps

bellini666 commented 1 year ago

Hey @devkral ,

Thanks for pointing it out. Do you want to open a PR for that?