From 32a242b560a721c7afd8b5ce3264f44a445aa685 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Wed, 14 Jun 2023 00:00:29 +0300 Subject: [PATCH] feat(backups): register backups in GraphQL schema --- selfprivacy_api/graphql/schema.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/selfprivacy_api/graphql/schema.py b/selfprivacy_api/graphql/schema.py index dff9304..e364dd1 100644 --- a/selfprivacy_api/graphql/schema.py +++ b/selfprivacy_api/graphql/schema.py @@ -6,6 +6,7 @@ from typing import AsyncGenerator import strawberry from selfprivacy_api.graphql import IsAuthenticated from selfprivacy_api.graphql.mutations.api_mutations import ApiMutations +from selfprivacy_api.graphql.mutations.backup_mutations import BackupMutations from selfprivacy_api.graphql.mutations.job_mutations import JobMutations from selfprivacy_api.graphql.mutations.mutation_interface import GenericMutationReturn from selfprivacy_api.graphql.mutations.services_mutations import ServicesMutations @@ -14,6 +15,7 @@ from selfprivacy_api.graphql.mutations.storage_mutations import StorageMutations from selfprivacy_api.graphql.mutations.system_mutations import SystemMutations from selfprivacy_api.graphql.queries.api_queries import Api +from selfprivacy_api.graphql.queries.backup import Backup from selfprivacy_api.graphql.queries.jobs import Job from selfprivacy_api.graphql.queries.services import Services from selfprivacy_api.graphql.queries.storage import Storage @@ -58,6 +60,11 @@ class Query: """Services queries""" return Services() + @strawberry.field(permission_classes=[IsAuthenticated]) + def backup(self) -> Backup: + """Backup queries""" + return Backup() + @strawberry.type class Mutation( @@ -68,6 +75,7 @@ class Mutation( StorageMutations, ServicesMutations, JobMutations, + BackupMutations, ): """Root schema for mutations"""