Skip to content

Commit b60178b

Browse files
committed
feat(filter): add "created by" filter for project and tutorial
1 parent cb85897 commit b60178b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

apps/project/graphql/filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class ProjectFilter:
1414
requesting_organization_id: strawberry.auto
1515
is_featured: strawberry.auto
1616
status: strawberry.auto
17-
team: strawberry.auto
17+
team_id: strawberry.auto
1818
is_private: strawberry.auto
1919
progress_status: strawberry.auto
20+
created_by_id: strawberry.auto
2021

2122
topic = unaccented_filter("topic")
2223
region = unaccented_filter("region")

apps/tutorial/graphql/filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class TutorialFilter:
1111
id: strawberry.auto
1212
status: strawberry.auto
1313
project: ProjectFilter | None
14+
created_by_id: strawberry.auto
1415

1516
name = unaccented_filter("name")
1617

schema.graphql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -774,10 +774,6 @@ union DeleteProjectPayload = OperationInfo | ProjectType
774774

775775
union DeleteTutorialPayload = OperationInfo | TutorialType
776776

777-
input DjangoModelFilterInput {
778-
id: ID!
779-
}
780-
781777
input FindProjectPropertyInput {
782778
"""Numeric value as string"""
783779
aoiGeometry: String!
@@ -1453,6 +1449,7 @@ input ProjectFilter {
14531449
DISTINCT: Boolean
14541450
NOT: ProjectFilter
14551451
OR: ProjectFilter
1452+
createdById: IDBaseFilterLookup
14561453
id: IDBaseFilterLookup
14571454
isFeatured: BoolBaseFilterLookup
14581455

@@ -1470,7 +1467,7 @@ input ProjectFilter {
14701467
"""Which group, institution or community is requesting this project?"""
14711468
requestingOrganizationId: IDBaseFilterLookup
14721469
status: ProjectStatusEnumFilterLookup
1473-
team: DjangoModelFilterInput
1470+
teamId: IDBaseFilterLookup
14741471
topic: String
14751472
}
14761473

@@ -2270,6 +2267,7 @@ input TutorialFilter {
22702267
DISTINCT: Boolean
22712268
NOT: TutorialFilter
22722269
OR: TutorialFilter
2270+
createdById: IDBaseFilterLookup
22732271
id: IDBaseFilterLookup
22742272
name: String
22752273

0 commit comments

Comments
 (0)