diff --git a/resolvers/reader.py b/resolvers/reader.py index 9e553f49..8c596fe3 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -370,6 +370,9 @@ def apply_filters(q: select, filters: dict[str, Any]) -> select: if by_after: ts = int(by_after) q = q.filter(Shout.created_at > ts) + by_community = filters.get("community") + if by_community: + q = q.filter(Shout.community == by_community) return q diff --git a/schema/input.graphql b/schema/input.graphql index 3e322b10..21d612d3 100644 --- a/schema/input.graphql +++ b/schema/input.graphql @@ -79,6 +79,7 @@ input LoadShoutsFilters { featured: Boolean reacted: Boolean # requires auth, used in load_shouts_feed after: Int + community: Int } input LoadShoutsOptions {