Open kentuck13 opened 3 years ago
I have articles. Each user must be read only their own articles. -> Articles.objects.filter(user=request.user)
class ArticleModelType(DjangoSerializerType): class Meta: filter_fields = { 'name': ['exact'], 'category': ['exact'], 'category__name': ['exact'] } serializer_class = ArticleSerializer class Query(graphene.ObjectType): article, articles = ArticleModelType.QueryFields()
I still haven't found a place where I should put this QuerySet = Articles.objects.filter(user=request.user)
I have articles. Each user must be read only their own articles. -> Articles.objects.filter(user=request.user)
I still haven't found a place where I should put this QuerySet = Articles.objects.filter(user=request.user)