selfprivacy-rest-api/selfprivacy_api/graphql/queries/services.py

19 lines
486 B
Python
Raw Normal View History

2022-08-12 21:29:18 +00:00
"""Services status"""
# pylint: disable=too-few-public-methods
import typing
import strawberry
2022-08-12 22:12:28 +00:00
from selfprivacy_api.graphql.common_types.service import (
Service,
service_to_graphql_service,
2022-08-12 21:29:18 +00:00
)
2022-08-12 22:12:28 +00:00
from selfprivacy_api.services import get_all_services
2022-08-12 21:29:18 +00:00
@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]