mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-07 07:00:35 +03:00
Update authorization.rst
This commit is contained in:
parent
84d82f82a9
commit
446013c752
|
@ -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
|
||||
-----------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user