selfprivacy-rest-api/selfprivacy_api/graphql/queries/services.py
dettlaff 848befe3f1 feat: Use proper logging (#154)
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/154
Reviewed-by: Inex Code <inex.code@selfprivacy.org>
Co-authored-by: dettlaff <dettlaff@riseup.net>
Co-committed-by: dettlaff <dettlaff@riseup.net>
2024-10-23 14:38:01 +03:00

21 lines
495 B
Python

"""Services status"""
# pylint: disable=too-few-public-methods
import typing
import strawberry
from selfprivacy_api.graphql.common_types.service import (
Service,
service_to_graphql_service,
)
from selfprivacy_api.services import ServiceManager
@strawberry.type
class Services:
@strawberry.field
def all_services(self) -> typing.List[Service]:
services = ServiceManager.get_all_services()
return [service_to_graphql_service(service) for service in services]