Update authorization.rst

This commit is contained in:
Syrus Akbary 2018-09-05 13:21:39 +02:00 committed by GitHub
parent 84d82f82a9
commit 446013c752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,11 +64,8 @@ define a resolve method for that field and return the desired queryset.
all_posts = DjangoFilterConnectionField(PostNode) all_posts = DjangoFilterConnectionField(PostNode)
def resolve_all_posts(self, info): def resolve_all_posts(self, info):
post = Post.objects.filter(published=True) return Post.objects.filter(published=True)
if post is not None:
return post
else:
return None
User-based Queryset Filtering User-based Queryset Filtering
----------------------------- -----------------------------