inbox/services/schema.py
2023-10-05 00:48:08 +03:00

14 lines
281 B
Python

from ariadne import ScalarType, QueryType, MutationType
datetime_scalar = ScalarType("DateTime")
@datetime_scalar.serializer
def serialize_datetime(value):
return value.isoformat
query = QueryType()
mutation = MutationType()
resolvers = [query, mutation, datetime_scalar]