2👍
✅
Based on https://github.com/graphql-python/graphene/issues/110, the correct way to do this is with a string:
class FolderNode(DjangoObjectType):
folders = graphene.List('FolderNode')
0👍
An idea: what about defining a property not considered at class creation, as follows
class FolderNode(DjangoObjectType):
@property
def folders(self):
return graphene.List(FolderNode)
- [Answered ]-URL not resolved with APIView in Django REST Framework for non-model end point
- [Answered ]-How to integrate Django form with Ajax?
Source:stackexchange.com