feat: with sdl resolver in schema.py

This commit is contained in:
2023-12-01 22:56:50 -03:00
parent 1a19264bb0
commit 2338eb1fe4
2 changed files with 13 additions and 2 deletions

View File

@@ -2,4 +2,15 @@ from ariadne import QueryType, MutationType
query = QueryType()
mutation = MutationType()
# duffok was here 2023-12-1
# This is a query resolver for Apollo Federation
@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}
resolvers = [query, mutation]