Is something like this possible
class UserNode(DjangoObjectType):
friends = graphene.List(UserNode)
class Meta:
interfaces = (Node, )
model = UserModel
if there currently isn't a way to do this, I propose doing something similar to how django models resolve strings to reference models
This is solved by using a lambda, thanks @syrusakbary for pointing this out!
class UserNode(DjangoObjectType):
friends = graphene.List(lambda: UserNode)
class Meta:
interfaces = (Node, )
model = UserModel
Most helpful comment
This is solved by using a lambda, thanks @syrusakbary for pointing this out!