feat: add in schema.py resolver fro _server

This commit is contained in:
2023-10-06 03:51:23 -03:00
parent 6ddfc11a91
commit d9f47183c8
2 changed files with 11 additions and 0 deletions

View File

@@ -10,5 +10,13 @@ def serialize_datetime(value):
query = QueryType()
@query.field("_service")
def resolve_service(*_):
print("Inside the _service resolver")
# For now, return a placeholder SDL.
sdl = "type Query { _service: _Service } type _Service { sdl: String }"
return {"sdl": sdl}
mutation = MutationType()
resolvers = [query, mutation, datetime_scalar]