feat: Test if getting headers works

This commit is contained in:
Inex Code 2023-04-12 16:13:30 +03:00
parent 9376fe151f
commit e0ea004e80

View file

@ -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(