Files
inbox/services/schema.py

14 lines
283 B
Python
Raw Normal View History

2023-10-05 00:48:08 +03:00
from ariadne import ScalarType, QueryType, MutationType
2023-10-05 00:43:07 +03:00
datetime_scalar = ScalarType("DateTime")
@datetime_scalar.serializer
def serialize_datetime(value):
2023-10-05 00:48:08 +03:00
return value.isoformat
2023-10-05 00:43:07 +03:00
2023-10-05 00:46:16 +03:00
query = QueryType()
mutation = MutationType()
resolvers = [query, mutation, datetime_scalar, ]