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