From c5ea08f93936edc0e18db8336d0fa61ddce14488 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Fri, 6 Oct 2023 05:47:41 -0300 Subject: [PATCH] feat: add to SDL full Query Mutation schema --- services/schema.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/schema.py b/services/schema.py index e6b9c593..16ce11d6 100644 --- a/services/schema.py +++ b/services/schema.py @@ -13,10 +13,11 @@ 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} + # 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]