We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d82f8 commit 446013cCopy full SHA for 446013c
docs/authorization.rst
@@ -64,11 +64,8 @@ define a resolve method for that field and return the desired queryset.
64
all_posts = DjangoFilterConnectionField(PostNode)
65
66
def resolve_all_posts(self, info):
67
- post = Post.objects.filter(published=True)
68
- if post is not None:
69
- return post
70
- else:
71
- return None
+ return Post.objects.filter(published=True)
+
72
73
User-based Queryset Filtering
74
-----------------------------
0 commit comments