sdl-service
This commit is contained in:
parent
925727eea0
commit
76b5512f4f
|
@ -1,21 +1,22 @@
|
|||
from ariadne import ScalarType, QueryType, MutationType
|
||||
|
||||
datetime_scalar = ScalarType("DateTime")
|
||||
query = QueryType()
|
||||
mutation = MutationType()
|
||||
|
||||
|
||||
@datetime_scalar.serializer
|
||||
def serialize_datetime(value):
|
||||
return value.isoformat()
|
||||
|
||||
query = QueryType()
|
||||
|
||||
@query.field("_service")
|
||||
def resolve_service(*_):
|
||||
# Load the full SDL from your SDL file
|
||||
with open("inbox.graphql", "r") as file:
|
||||
full_sdl = file.read()
|
||||
|
||||
|
||||
return {"sdl": full_sdl}
|
||||
|
||||
mutation = MutationType()
|
||||
|
||||
resolvers = [query, mutation, datetime_scalar]
|
||||
|
|
Loading…
Reference in New Issue
Block a user