core/services/schema.py
Untone db76ba3733
Some checks failed
deploy / deploy (push) Failing after 2m1s
0.2.14
2023-11-22 19:38:39 +03:00

25 lines
528 B
Python

from ariadne import ScalarType, QueryType, MutationType
datetime_scalar = ScalarType("DateTime")
query = QueryType()
mutation = MutationType()
@datetime_scalar.serializer
def serialize_datetime(value):
return value.isoformat()
# NOTE: was used by studio
# @query.field("_service")
# def resolve_service(*_):
# # Load the full SDL from your SDL file
# with open("schemas/core.graphql", "r") as file:
# full_sdl = file.read()
#
# return {"sdl": full_sdl}
resolvers = [query, mutation, datetime_scalar]