Skip to content

How to provide an argument from DjangoFilterConnectionField to a node #618

@ulkoart

Description

@ulkoart
items = DjangoFilterConnectionField(ItemNode, userId=graphene.String())
...
class ItemNode(DjangoObjectType):
    def resolve_something(self, info):
        userId = ... ??? ...
        if userId:
               return self.something.filter(version__isnull=True)
        return self.something.filter(version__isnull=False)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions