Skip to content

Filtering in Araidne ? #732

Answered by rafalp
lexa105 asked this question in Q&A
Dec 2, 2021 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

To filter data, implement filtering logic in your resolvers. Assuming you are using Django:

def resolve_trailes(*_, published_from=None):
    queryset = Trailer.objects.all()
    if published_from:
        queryset = queryset.filter(published_from__icontains=published_from)
    return queryset

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@lexa105
Comment options

Answer selected by lexa105
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants