selfprivacy-rest-api/selfprivacy_api/graphql/queries/services.py
2022-08-13 02:12:28 +04:00

19 lines
486 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 get_all_services
@strawberry.type
class Services:
@strawberry.field
def all_services(self, info) -> typing.List[Service]:
services = get_all_services()
return [service_to_graphql_service(service) for service in services]