core/services/schema.py

25 lines
544 B
Python
Raw Normal View History

2023-12-17 20:30:20 +00:00
from ariadne import MutationType, QueryType # , ScalarType
2024-01-25 19:41:27 +00:00
2023-11-22 21:12:23 +00:00
# datetime_scalar = ScalarType("DateTime")
2023-10-06 09:51:07 +00:00
query = QueryType()
mutation = MutationType()
2021-07-02 09:16:43 +00:00
2022-09-03 10:50:14 +00:00
2023-11-22 21:12:23 +00:00
# @datetime_scalar.serializer
# def serialize_datetime(value):
# return value.isoformat()
2022-09-03 10:50:14 +00:00
2021-07-02 09:16:43 +00:00
2023-11-22 16:38:39 +00:00
# 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}
2023-10-06 09:51:07 +00:00
2023-11-22 21:12:23 +00:00
resolvers = [query, mutation] # , datetime_scalar]