This commit is contained in:
2025-01-26 17:53:16 +03:00
parent eee2c1a13d
commit 4a26e4f75b
3 changed files with 14 additions and 9 deletions

View File

@@ -1,17 +1,18 @@
from asyncio.log import logger
import httpx
from ariadne import MutationType, QueryType, ObjectType
from ariadne import MutationType, ObjectType, QueryType
from settings import AUTH_URL
query = QueryType()
mutation = MutationType()
def type_(name: str) -> ObjectType:
"""
Создает резолвер для объектного типа
:param name: Имя типа в схеме GraphQL
:return: Резолвер объектного типа
"""
@@ -19,6 +20,7 @@ def type_(name: str) -> ObjectType:
resolvers.append(resolver)
return resolver
resolvers = [query, mutation]