14 lines
276 B
Python
14 lines
276 B
Python
|
from ariadne import ScalarType, QueryType, MutationType
|
||
|
|
||
|
query = QueryType()
|
||
|
mutation = MutationType()
|
||
|
datetime_scalar = ScalarType("DateTime")
|
||
|
|
||
|
|
||
|
@datetime_scalar.serializer
|
||
|
def serialize_datetime(value):
|
||
|
return value.isoformat()
|
||
|
|
||
|
|
||
|
scalars = {"DateTime": datetime_scalar}
|