Answer the question
In order to leave comments, you need to log in
Error "type object 'GenericType' has no attribute 'get_queryset'"?
I'm trying to display a list of users using GraphQL. I'm using the graphene-django-extras library (latest 0.4.9) .
import graphene
from django.contrib.auth import get_user_model
from graphene_django_extras import DjangoListObjectType, DjangoListObjectField
class UserListType(DjangoListObjectType):
class Meta:
model = get_user_model()
class Query(graphene.ObjectType):
all_users = DjangoListObjectField(UserListType)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question