selfprivacy-rest-api/selfprivacy_api/graphql/mutations/mutation_interface.py

22 lines
396 B
Python
Raw Normal View History

2022-06-29 20:39:46 +03:00
import strawberry
import typing
from selfprivacy_api.graphql.common_types.jobs import ApiJob
2022-06-29 20:39:46 +03:00
2022-07-07 16:53:19 +03:00
2022-06-29 20:39:46 +03:00
@strawberry.interface
class MutationReturnInterface:
success: bool
message: str
code: int
2022-07-05 15:11:41 +03:00
2022-07-07 16:53:19 +03:00
2022-07-05 15:11:41 +03:00
@strawberry.type
class GenericMutationReturn(MutationReturnInterface):
pass
@strawberry.type
class GenericJobMutationReturn(MutationReturnInterface):
job: typing.Optional[ApiJob] = None