diff --git a/selfprivacy_api/graphql/schema.py b/selfprivacy_api/graphql/schema.py index dff9304..d65143f 100644 --- a/selfprivacy_api/graphql/schema.py +++ b/selfprivacy_api/graphql/schema.py @@ -4,6 +4,8 @@ import asyncio from typing import AsyncGenerator import strawberry +from strawberry.types import Info + from selfprivacy_api.graphql import IsAuthenticated from selfprivacy_api.graphql.mutations.api_mutations import ApiMutations from selfprivacy_api.graphql.mutations.job_mutations import JobMutations @@ -58,6 +60,11 @@ class Query: """Services queries""" return Services() + @strawberry.field() + def test(self, info: Info) -> str: + """Test query""" + return info.context["request"].headers["Accept-Language"] + @strawberry.type class Mutation(