schema-sdl-serv
This commit is contained in:
parent
2697ec4fcd
commit
01be3ac95e
|
@ -1,7 +1,8 @@
|
|||
from ariadne import MutationType, QueryType, ScalarType
|
||||
|
||||
from ariadne import ScalarType, QueryType, MutationType
|
||||
|
||||
datetime_scalar = ScalarType("DateTime")
|
||||
query = QueryType()
|
||||
mutation = MutationType()
|
||||
|
||||
|
||||
@datetime_scalar.serializer
|
||||
|
@ -9,6 +10,13 @@ def serialize_datetime(value):
|
|||
return value.isoformat()
|
||||
|
||||
|
||||
query = QueryType()
|
||||
mutation = MutationType()
|
||||
@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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user