mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
feat(backups): register backups in GraphQL schema
This commit is contained in:
parent
a4b0e6f208
commit
32a242b560
|
@ -6,6 +6,7 @@ from typing import AsyncGenerator
|
||||||
import strawberry
|
import strawberry
|
||||||
from selfprivacy_api.graphql import IsAuthenticated
|
from selfprivacy_api.graphql import IsAuthenticated
|
||||||
from selfprivacy_api.graphql.mutations.api_mutations import ApiMutations
|
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.job_mutations import JobMutations
|
||||||
from selfprivacy_api.graphql.mutations.mutation_interface import GenericMutationReturn
|
from selfprivacy_api.graphql.mutations.mutation_interface import GenericMutationReturn
|
||||||
from selfprivacy_api.graphql.mutations.services_mutations import ServicesMutations
|
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.mutations.system_mutations import SystemMutations
|
||||||
|
|
||||||
from selfprivacy_api.graphql.queries.api_queries import Api
|
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.jobs import Job
|
||||||
from selfprivacy_api.graphql.queries.services import Services
|
from selfprivacy_api.graphql.queries.services import Services
|
||||||
from selfprivacy_api.graphql.queries.storage import Storage
|
from selfprivacy_api.graphql.queries.storage import Storage
|
||||||
|
@ -58,6 +60,11 @@ class Query:
|
||||||
"""Services queries"""
|
"""Services queries"""
|
||||||
return Services()
|
return Services()
|
||||||
|
|
||||||
|
@strawberry.field(permission_classes=[IsAuthenticated])
|
||||||
|
def backup(self) -> Backup:
|
||||||
|
"""Backup queries"""
|
||||||
|
return Backup()
|
||||||
|
|
||||||
|
|
||||||
@strawberry.type
|
@strawberry.type
|
||||||
class Mutation(
|
class Mutation(
|
||||||
|
@ -68,6 +75,7 @@ class Mutation(
|
||||||
StorageMutations,
|
StorageMutations,
|
||||||
ServicesMutations,
|
ServicesMutations,
|
||||||
JobMutations,
|
JobMutations,
|
||||||
|
BackupMutations,
|
||||||
):
|
):
|
||||||
"""Root schema for mutations"""
|
"""Root schema for mutations"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue