resolvers-fix
This commit is contained in:
parent
044c21f956
commit
a182c2f599
1
main.py
1
main.py
|
@ -5,6 +5,7 @@ from ariadne import load_schema_from_path, make_executable_schema
|
||||||
from ariadne.asgi import GraphQL
|
from ariadne.asgi import GraphQL
|
||||||
from starlette.applications import Starlette
|
from starlette.applications import Starlette
|
||||||
from services.redis import redis
|
from services.redis import redis
|
||||||
|
from services.schema import resolvers
|
||||||
from settings import DEV_SERVER_PID_FILE_NAME, SENTRY_DSN, MODE
|
from settings import DEV_SERVER_PID_FILE_NAME, SENTRY_DSN, MODE
|
||||||
|
|
||||||
import_module("resolvers")
|
import_module("resolvers")
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
from ariadne import ScalarType, QueryType, MutationType
|
from ariadne import ScalarType, QueryType, MutationType, SubscriptionType
|
||||||
|
|
||||||
query = QueryType()
|
|
||||||
mutation = MutationType()
|
|
||||||
datetime_scalar = ScalarType("DateTime")
|
datetime_scalar = ScalarType("DateTime")
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,4 +8,7 @@ def serialize_datetime(value):
|
||||||
return value.isoformat()
|
return value.isoformat()
|
||||||
|
|
||||||
|
|
||||||
scalars = {"DateTime": datetime_scalar}
|
query = QueryType()
|
||||||
|
mutation = MutationType()
|
||||||
|
subscription = SubscriptionType()
|
||||||
|
resolvers = [query, mutation, subscription, datetime_scalar]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user