mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 13:01:28 +00:00
feat: Test if getting headers works
This commit is contained in:
parent
9376fe151f
commit
e0ea004e80
|
@ -4,6 +4,8 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
from typing import AsyncGenerator
|
from typing import AsyncGenerator
|
||||||
import strawberry
|
import strawberry
|
||||||
|
from strawberry.types import Info
|
||||||
|
|
||||||
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.job_mutations import JobMutations
|
from selfprivacy_api.graphql.mutations.job_mutations import JobMutations
|
||||||
|
@ -58,6 +60,11 @@ class Query:
|
||||||
"""Services queries"""
|
"""Services queries"""
|
||||||
return Services()
|
return Services()
|
||||||
|
|
||||||
|
@strawberry.field()
|
||||||
|
def test(self, info: Info) -> str:
|
||||||
|
"""Test query"""
|
||||||
|
return info.context["request"].headers["Accept-Language"]
|
||||||
|
|
||||||
|
|
||||||
@strawberry.type
|
@strawberry.type
|
||||||
class Mutation(
|
class Mutation(
|
||||||
|
|
Loading…
Reference in a new issue