-
Notifications
You must be signed in to change notification settings - Fork 766
Closed
Description
First of all, thanks for the amazing work!
By using this: http://docs.graphene-python.org/projects/django/en/latest/authorization/#queryset-filtering-on-lists
How can I achieve the same thing with relay queries. For example with:
class ProjectNode(DjangoObjectType):
class Meta:
model = Project
interfaces = (relay.Node, )
class ProjectFilter(django_filters.FilterSet):
class Meta:
model = Project
fields = [
'id', 'published',
]
class Query(object):
project = relay.Node.Field(ProjectNode)
projects = DjangoFilterConnectionField(
ProjectNode,
filterset_class=ProjectFilter
)
def resolve_projects(self, args, info): # It does not work
return Project.objects.filter(published=True)Basically, I want to limit the queryset to only published projects.
Thanks again.