From 446013c75232bb4e9aee91d849516f48cb64d6a2 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Wed, 5 Sep 2018 13:21:39 +0200 Subject: [PATCH] Update authorization.rst --- docs/authorization.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/authorization.rst b/docs/authorization.rst index bdd1c8e..aa40656 100644 --- a/docs/authorization.rst +++ b/docs/authorization.rst @@ -64,11 +64,8 @@ define a resolve method for that field and return the desired queryset. all_posts = DjangoFilterConnectionField(PostNode) def resolve_all_posts(self, info): - post = Post.objects.filter(published=True) - if post is not None: - return post - else: - return None + return Post.objects.filter(published=True) + User-based Queryset Filtering -----------------------------