mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-07 15:10: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)
|
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
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user