diff --git a/test_app/custom_mutations.py b/test_app/custom_mutations.py deleted file mode 100644 index 151c8b3..0000000 --- a/test_app/custom_mutations.py +++ /dev/null @@ -1,17 +0,0 @@ -import strawberry -from api.mutations import Mutation as BaseMutation - - -@strawberry.mutation -def my_custom_mutation(self) -> str: - return "bar" - -@strawberry.mutation -def my_override_mutation(self) -> str: - return "Sorry, I overrode the mutation" - - -@strawberry.type -class Mutation(BaseMutation): - bar: str = my_custom_mutation - create_sample: str = my_override_mutation diff --git a/test_app/custom_queries.py b/test_app/custom_queries.py deleted file mode 100644 index 5df5753..0000000 --- a/test_app/custom_queries.py +++ /dev/null @@ -1,12 +0,0 @@ -import strawberry -from api.queries import Query as BaseQuery - - -@strawberry.field -def my_custom_field(self) -> str: - return "foo" - - -@strawberry.type -class Query(BaseQuery): - foo: str = my_custom_field diff --git a/test_app/main.py b/test_app/main.py index 6d32a4c..db4ccd7 100644 --- a/test_app/main.py +++ b/test_app/main.py @@ -9,9 +9,8 @@ from platformics.settings import APISettings from database import models -from custom_mutations import Mutation -from custom_queries import Query - +from api.mutations import Mutation +from api.queries import Query settings = APISettings.model_validate({}) # Workaround for https://github.com/pydantic/pydantic/issues/3753 schema = strawberry.Schema(query=Query, mutation=Mutation, config=get_strawberry_config(), extensions=[HandleErrors()])