@@ -80,6 +80,7 @@ def default_custom_options(self, project_type: ProjectTypeEnum) -> list[CustomOp
8080
8181 # Private --------------------
8282 project : ProjectType = strawberry_django .field (extensions = [IsAuthenticated ()])
83+ public_project : ProjectType = strawberry_django .field ()
8384
8485 project_asset : ProjectAssetType = strawberry_django .field (extensions = [IsAuthenticated ()])
8586
@@ -91,6 +92,7 @@ def default_custom_options(self, project_type: ProjectTypeEnum) -> list[CustomOp
9192 )
9293
9394 organization : OrganizationType = strawberry_django .field (extensions = [IsAuthenticated ()])
95+ public_organization : OrganizationType = strawberry_django .field ()
9496
9597 # --- Paginated
9698 @strawberry_django .offset_paginated (
@@ -108,6 +110,16 @@ def organizations(
108110 return Organization .objects .all ()
109111 return Organization .objects .exclude (is_archived = True ).all ()
110112
113+ @strawberry_django .offset_paginated (
114+ OffsetPaginated [OrganizationType ],
115+ order = OrganizationOrder ,
116+ filters = OrganizationFilter ,
117+ )
118+ def public_organizations (
119+ self ,
120+ ) -> QuerySet [Organization ]:
121+ return Organization .objects .exclude (is_archived = True ).all ()
122+
111123 # --- Paginated
112124 @strawberry_django .offset_paginated (
113125 OffsetPaginated [ProjectType ],
@@ -129,3 +141,18 @@ def projects(
129141 Project .Status .PAUSED ,
130142 ],
131143 ).all ()
144+
145+ @strawberry_django .offset_paginated (
146+ OffsetPaginated [ProjectType ],
147+ order = ProjectOrder ,
148+ filters = ProjectFilter ,
149+ )
150+ def public_projects (
151+ self ,
152+ ) -> QuerySet [Project ]:
153+ return Project .objects .filter (
154+ status__in = [
155+ Project .Status .FINISHED ,
156+ Project .Status .PUBLISHED ,
157+ ],
158+ ).all ()
0 commit comments