2022-08-25 17:03:56 +00:00
|
|
|
"""Services status"""
|
2024-06-10 01:52:26 +00:00
|
|
|
|
2022-08-25 17:03:56 +00:00
|
|
|
# pylint: disable=too-few-public-methods
|
|
|
|
import typing
|
|
|
|
import strawberry
|
|
|
|
|
|
|
|
from selfprivacy_api.graphql.common_types.service import (
|
|
|
|
Service,
|
|
|
|
service_to_graphql_service,
|
|
|
|
)
|
2024-07-24 11:41:32 +00:00
|
|
|
from selfprivacy_api.services import ServiceManager
|
2022-08-25 17:03:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
@strawberry.type
|
|
|
|
class Services:
|
|
|
|
@strawberry.field
|
|
|
|
def all_services(self) -> typing.List[Service]:
|
2024-07-24 11:41:32 +00:00
|
|
|
services = ServiceManager.get_all_services()
|
2022-08-25 17:03:56 +00:00
|
|
|
return [service_to_graphql_service(service) for service in services]
|